A minimal HTTP server built with pure Elixir and the Erlang runtime.
This project is designed to refresh core fundamentals of Elixir, including:
- processes and concurrency (BEAM model)
- pattern matching
- recursion
- raw TCP sockets via
:gen_tcp
No frameworks, no abstractions
Start an interactive shell:
iex -S mixThen run:
Servy.start(4000)You should see:
Listening on http://localhost:4000
In another terminal:
curl http://localhost:4000/
curl http://localhost:4000/health- Handling HTTP over raw TCP
- Spawning a process per request
- Parsing request lines manually
- Building HTTP responses from scratch