⭐ starfruit 🍎

Package VersionHex Docs

starfruit is a simple (and hacked together) server built on top of glisten that hosts static content over the gemini protocol! Simply put your gemtexts and/or other files in the capsule/ folder (which should be directly in your project folder) and run! Gemini servers require ECC certificates. If youre looking for a certificate generator, I used certified to generate mine.

starfruit currently only supports response codes 20, 51, and 59. In the future, I may add support for redirect codes, but this was a hobby project of mine and my only goal was to write a server that could serve static content.

gleam add starfruit
import starfruit
pub fn main() {
starfruit.start(
port: 1965,
cert: "path/to/certificate",
key: "path/to/key",
loopback: True, //set to False to listen on all interfaces instead of loopback
hostname: "your.domain"
)
}

Further documentation can be found at https://hexdocs.pm/starfruit.