A type safe experimental web framework for idris2 targeting node js.
-
HTTP/HTTPS server, HTTP2 server
-
Streaming from end-to-end
-
Supports async execution via idris2-promise
-
Routing - based on Alternative monad
- Match HTTP methods
- Parse HTTP url
- Support path parameters, own path syntax
-
Flexible: all combinators can be replaced
-
Example file server in test
-
Example text based echo implementation in test
- idris2-pack
- idris2 version 0.5.1, see installation at idris2-pack documentation
- node LTS 16.x, see download page
Supporting multiple formats can introduce many dependencies, so their handling is encouraged to be packaged separately.
Known consumers and producers:
- json for supporting
application/json
pack build tyttp.ipkg
pack build json/tyttp-json.ipkg
pack build adapter-node/tyttp-adapter-node.ipkg
pack test tyttp
pack test tyttp-json
pack test tyttp-adapter-node
pack run tyttp-adapter-node
docker build . -t tyttp:latest
docker run --rm -it -p 3000:3000 tyttp:latest
Then you can access the running application on port 3000:
curl http://localhost:3000/query?query-string=will-be-sent-back