Hacker News new | ask | show | jobs
by adrianlv512 821 days ago
Not sure if it meets all of your requirements, but what about using Crystal HTTP::Server[1] and building a fully statically linked[2] binary and deploying via a Docker scratch image[3] using a Multi-stage build[4].

Here's[5] an example I put together that I have running on fly.io[6]. I'm doing a redirect for root path, but it could easily be changed to serve up the contents of index.html.

I use a similar deployment for a small site I created[7] to generate UUIDs. Kemal[8] also looks like a good alternative.

----

Update:

Here's[9] an example also running on fly.io[10] using Kemal[8]

[1] https://crystal-lang.org/api/1.11.2/HTTP/Server.html

[2] https://crystal-lang.org/reference/1.11/guides/static_linkin...

[3] https://docs.docker.com/build/building/multi-stage/

[4] https://hub.docker.com/_/scratch/

[5] https://github.com/adrianlv512/minimal-server

[6] https://minimal-server.fly.dev

[7] https://uuid-generator.org/

[8] https://kemalcr.com/

[9] https://github.com/adrianlv512/minimal-server-kemal

[10] https://minimal-server-kemal.fly.dev

1 comments

I don't think anyone looking to just serve static files wants to touch a programming language, deal with any (additional) build steps, or run Docker. Especially the parent who expressed "minimal" as a requirement.