[users] Simple Gemini server for testing in the current directory?


mailinglists at ngalt.com writes:

> One thing that I like about HTTP is that there are oodles of ways to 
spin up a simple server for testing on localhost. Things like `python3 -m 
http.server` and `caddy run` are what I'm thinking of. Since this is 
Gemini and not bare-bones HTTP, It'd have to handle key generation.
>
> Is there a server like that yet for Gemini that runs on macOS? 

I'm writing a server that almost fit in that description, I was thinking
to share it with the list when I'll finish the vhost and configuration
stuff I was working on, but anyway.

It's called gmid[0][1].  It doesn't (yet) handle the creation of keys,
but you can easily generate a cert and store, say, in you home and
you're done.  Once you've built it, you can serve any directory with
`gmid -c cert.pem -k key.pem -d dir` [2].  Ctrl-c when you're done :)

(I'm also using it to serve my capsule)

It's written in C, sandboxed by default (from the next version) on
OpenBSD, FreeBSD and linux, and with LibreSSL/libretls as only
dependency.  You'll also need lex and yacc/bison to build.  I don't have
a mac, but I don't see why it shouldn't run fine there.

Cheers,

Omar Polo


[0]: https://github.com/omar-polo/gmid
[1]: gemini://gemini.omarpolo.com/pages/gmid.gmi
[2]: this on the last stable (v1.4.1), I've changed -c to -C and -k to
     -K in the master when adding the config (-c)

---

Previous in thread (2 of 9): 🗣️ Miguel de Luis Espinosa (enteka (a) fastmail.com)

Next in thread (4 of 9): 🗣️ Michael Lazar (lazar.michael22 (a) gmail.com)

View entire thread.