💾 Archived View for soviet.circumlunar.space › oak › mailinglist › 14.gmi captured on 2024-06-16 at 12:59:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
Date: Tue, 19 Jan 2021 22:56:40 -0800
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?
--------
Date: Wed, 20 Jan 2021 10:02:10 +0100
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)
--------
Date: Wed, 20 Jan 2021 08:52:45 -0500
On Wed, Jan 20, 2021 at 1:57 AM <mailinglists at ngalt.com> wrote:
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?
Hi,
Jetforce was somewhat designed to fill that niche [0]. It has
automatic certificate generation and no config file to mess around
with.
python3 -m pip install jetforce
python3 -m jetforce --dir .
[0] https://github.com/michael-lazar/jetforce
--------
Date: Wed, 20 Jan 2021 15:13:54 -0500
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?
If you are a Lispnik, feel free to check out Space Age (The Clojurian's
Gemini Server):
https://gitlab.com/lambdatronic/space-age
Since Clojure compiles to Java bytecode, it's fully cross-platform. You
just need to install a recent JDK and the Clojure command line tool. Key
generation is handled with a single command, which is documented in the
project's README.
You can then launch Space Age with the following command:
$ clojure -M:run-server .
That will serve up the current directory and anything within it on port
1965. To serve up a different directory, just replace "." with the
directory path.
Uniquely among Gemini servers, Space Age provides a form of server-side
application programming modeled after Clojure's de facto web programming
standard, Ring, but further simplified for Geminispace.
Essentially, dynamic routes can be programmed as simple functions that
take a request map and return a response map. All you have to do is add
a *.clj file anywhere under your document root (or under a user's
/home/username/public_gemini directory), make it executable, and define
a main function within it that will be called whenever that page is
requested by a Gemini client.
So rather than messing with environment variables and printing to
stdout, you can just write pure functions that take and receive data.
Fun times for functional programmers of all ages!
(happy :hacking)
Gary
--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
--------
Date: Wed, 20 Jan 2021 12:24:00 -0800
Personally, I test locally with agate, since I can easily run it with
flags and no config files:
https://github.com/mbrubeck/agate
I used to run it on my server as well, but I switch to gmnisrv for the
better logging.
As a bonus, you can build both as statically-linked binaries.
IDK how good macOS support is for either of them.
--
/Seirdy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210120/290d6138/attachment.sig>
--------
Date: Wed, 20 Jan 2021 16:09:45 -0500
It was thus said that the Great Gary Johnson once stated:
Uniquely among Gemini servers, Space Age provides a form of server-side
application programming modeled after Clojure's de facto web programming
standard, Ring, but further simplified for Geminispace.
Essentially, dynamic routes can be programmed as simple functions that
take a request map and return a response map. All you have to do is add
a *.clj file anywhere under your document root (or under a user's
/home/username/public_gemini directory), make it executable, and define
a main function within it that will be called whenever that page is
requested by a Gemini client.
I wouldn't say it's unique, just rare. GLV-1.12556 [1] is also easy to expand
but instead of looking for executable scripts [2], it uses Lua's module
system. These modules [3] used to return the data as Space-Age, but I
switched to a streaming model to save memory usage [4].
-spc
[1] https://github.com/spc476/GLV-1.12556
[2] With GLV-1.12556, executable scripts are treated as CGI scripts.
[3] And it's *all* modules---even serving up files from a directory is
done using this mechanism.
[4] Some resources served up by my server can be quite large.
--------
Date: Wed, 20 Jan 2021 18:31:13 -0500
Sean Conner <sean at conman.org> writes:
I wouldn't say it's unique, just rare. GLV-1.12556 [1] is also easy to expand
but instead of looking for executable scripts [2], it uses Lua's module
system. These modules [3] used to return the data as Space-Age, but I
switched to a streaming model to save memory usage [4].
-spc
[1] https://github.com/spc476/GLV-1.12556
[2] With GLV-1.12556, executable scripts are treated as CGI scripts.
[3] And it's *all* modules---even serving up files from a directory is
done using this mechanism.
[4] Some resources served up by my server can be quite large.
Thanks for the tip, Sean. I hadn't realized you had also used a
functional programming model for your Lua CGI scripts.
Always something new to learn,
Gary
--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
--------
Date: Fri, 22 Jan 2021 14:59:25 -0500
My stargazer[1] has an option for this. If you run `stargazer -d` it'll
server files out of the current directory and do file listing. It
auto-generates certs and sticks them in `~/.local/share/stargazer`. Hope
that helps ?.
[1] gemini://benaaron.dev/stargazer.gmi
--------