https://github.com/joshnuss/httpx
A tiny concurrent & fault-tolerant HTTP server that uses pattern matching for routing
https://github.com/joshnuss/httpx
concurrency elixir fault-tolerance http pattern-matching routing
Last synced: 6 months ago
JSON representation
A tiny concurrent & fault-tolerant HTTP server that uses pattern matching for routing
- Host: GitHub
- URL: https://github.com/joshnuss/httpx
- Owner: joshnuss
- Created: 2016-11-14T23:17:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T23:02:29.000Z (over 7 years ago)
- Last Synced: 2025-04-11T21:52:42.188Z (8 months ago)
- Topics: concurrency, elixir, fault-tolerance, http, pattern-matching, routing
- Language: Elixir
- Homepage:
- Size: 18.6 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTTPX
A tiny concurrent and fault-tolerant HTTP server.
## Usage
Create an app file:
```elixir
# in myapp.exs
defmodule MyApp do
# handle the / path
def call(%{path: "/"}),
do: %{code: 200, type: "text/plain", body: "OMG Y'ALL!!"}
# everything else is a 404 response
def call(_),
do: %{code: 404, body: "say what now?"}
end
```
Then, start the server
```shell
./httpx examples/myapp.exs --port 3000 &
curl localhost:3000
```
License: MIT