Skip to main content

README.md

# ⭐ starfruit 🍎

[![Package Version](https://img.shields.io/hexpm/v/starfruit)](https://hex.pm/packages/starfruit)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/starfruit/)

***starfruit*** is a simple (and hacked together) server built on top of **[glisten](https://hex.pm/packages/glisten)** that hosts static content over the **[gemini](https://geminiprotocol.net/)** 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](https://code.lag.net/robey/certified)** to generate mine.

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

```sh
gleam add starfruit
```

```gleam
import starfruit

pub fn main() {
  starfruit.start(
    port: 1965,
    cert: "path/to/certificate",
    key: "path/to/key",
  )
}
```

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