💾 Archived View for gemi.dev › gemini-mailing-list › 000086.gmi captured on 2023-11-04 at 12:24:27. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-12-28)

-=-=-=-=-=-=-

Announcing https://github.com/jackdoe/net-gemini - embeddable gemini go server

borislav nikolov <jack (a) sofialondonmoskva.com>

Hi,

First thanks for working on gemini! I have been struggling with the
modern web for a while, and finding this community makes me really
happy!

I would like to announce those two things:


  (made it today, so fresh out of the oven)
  embeddable golang gemini server (similar to net/http)

  inspired by https://tildegit.org/solderpunk/molly-brown

  example usage:
  gemini.HandleFunc("/example", func(w *gemini.Response, r *gemini.Request) {
  if len(r.URL.RawQuery) == 0 {
  w.SetStatus(gemini.StatusInput, "what is the answer to the ultimate question")
  } else {
  w.SetStatus(gemini.StatusSuccess, "text/gemini")
  answer := r.URL.RawQuery
  w.Write([]byte("HELLO: " + r.URL.Path + ", yes the answer is: " + answer))
  }
  })
  log.Fatal(gemini.ListenAndServeTLS(":1965", "localhost.crt", "localhost.key"))

  it is easy to build dynamic content (as the example shows) without
  resorting to CGI due to go's setuid limitation.


  shell + web/gemini/finger hosting

  for example:
    gemini://berserk.red/~jack

  I have a small hosting for my friends on https://berserk.red we use
  it for talk(1) and other things. This is just to showcase usage of
  net-gemini, and I used it to test and develop the api.


-b

Link to individual message.

solderpunk <solderpunk (a) SDF.ORG>

Thanks for the announcements, I've listed both!

Your server throws a "41 not found" status in response to requests for
gemini://berserk.red, only working correctly for gemini://berserk.red/
(with a trailing slash).  And the "not found" status could should be
51, not 41!

Cheers,
Solderpunk

On Fri, May 15, 2020 at 10:26:23PM +0200, borislav nikolov wrote:
> Hi,
> 
> First thanks for working on gemini! I have been struggling with the
> modern web for a while, and finding this community makes me really
> happy!
> 
> I would like to announce those two things:
> 
> * https://github.com/jackdoe/net-gemini
>   (made it today, so fresh out of the oven)
>   embeddable golang gemini server (similar to net/http)
> 
>   inspired by https://tildegit.org/solderpunk/molly-brown
> 
>   example usage:
>   gemini.HandleFunc("/example", func(w *gemini.Response, r *gemini.Request) {
>   if len(r.URL.RawQuery) == 0 {
>   w.SetStatus(gemini.StatusInput, "what is the answer to the ultimate question")
>   } else {
>   w.SetStatus(gemini.StatusSuccess, "text/gemini")
>   answer := r.URL.RawQuery
>   w.Write([]byte("HELLO: " + r.URL.Path + ", yes the answer is: " + answer))
>   }
>   })
>   log.Fatal(gemini.ListenAndServeTLS(":1965", "localhost.crt", "localhost.key"))
> 
>   it is easy to build dynamic content (as the example shows) without
>   resorting to CGI due to go's setuid limitation.
> 
> * gemini://berserk.red
>   shell + web/gemini/finger hosting
> 
>   for example:
>     gemini://berserk.red/~jack
> 
>   I have a small hosting for my friends on https://berserk.red we use
>   it for talk(1) and other things. This is just to showcase usage of
>   net-gemini, and I used it to test and develop the api.
> 
> 
> -b

Link to individual message.

borislav nikolov <jack (a) sofialondonmoskva.com>

Thanks!

I fixed both issues, thanks for spotting them! I was testing with
asuka and bombadillo and I think both of them added trailing slash,
thanks for spotting it!

slash issue:
https://github.com/jackdoe/net-gemini/commit/02c261b052edbc409f83b65f64a6654bc38e39c6

status code issue:
https://github.com/jackdoe/net-gemini/commit/d0cc95e98ebdd35ff0424fd61c13c77833184bc8

and re-deployed.

-b

On Fri, 15 May 2020 at 23:01, solderpunk <solderpunk at sdf.org> wrote:
>
> Thanks for the announcements, I've listed both!
>
> Your server throws a "41 not found" status in response to requests for
> gemini://berserk.red, only working correctly for gemini://berserk.red/
> (with a trailing slash).  And the "not found" status could should be
> 51, not 41!
>
> Cheers,
> Solderpunk
>
> On Fri, May 15, 2020 at 10:26:23PM +0200, borislav nikolov wrote:
> > Hi,
> >
> > First thanks for working on gemini! I have been struggling with the
> > modern web for a while, and finding this community makes me really
> > happy!
> >
> > I would like to announce those two things:
> >
> > * https://github.com/jackdoe/net-gemini
> >   (made it today, so fresh out of the oven)
> >   embeddable golang gemini server (similar to net/http)
> >
> >   inspired by https://tildegit.org/solderpunk/molly-brown
> >
> >   example usage:
> >   gemini.HandleFunc("/example", func(w *gemini.Response, r *gemini.Request) {
> >   if len(r.URL.RawQuery) == 0 {
> >   w.SetStatus(gemini.StatusInput, "what is the answer to the ultimate question")
> >   } else {
> >   w.SetStatus(gemini.StatusSuccess, "text/gemini")
> >   answer := r.URL.RawQuery
> >   w.Write([]byte("HELLO: " + r.URL.Path + ", yes the answer is: " + answer))
> >   }
> >   })
> >   log.Fatal(gemini.ListenAndServeTLS(":1965", "localhost.crt", "localhost.key"))
> >
> >   it is easy to build dynamic content (as the example shows) without
> >   resorting to CGI due to go's setuid limitation.
> >
> > * gemini://berserk.red
> >   shell + web/gemini/finger hosting
> >
> >   for example:
> >     gemini://berserk.red/~jack
> >
> >   I have a small hosting for my friends on https://berserk.red we use
> >   it for talk(1) and other things. This is just to showcase usage of
> >   net-gemini, and I used it to test and develop the api.
> >
> >
> > -b

Link to individual message.

---

Previous Thread: DNS SRV Records

Next Thread: ANN: SecretShop 1.0.0 and saintnet.tech