# ⭐ starfruit 🍎
[](https://hex.pm/packages/starfruit)
[](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 also depends on [simplifile](https://hex.pm/packages/simplifile) and [mimetype](https://hex.pm/packages/mimetype) for reading content and identifying their mimetypes, respectively.
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.
```sh
gleam add starfruit
```
```gleam
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>.