Simple example to illustrate how to use persistent and servant in combination.
Haskell
81
13 commits
updated Jan 4, 2018
This project is a small example for how to set up a web-server with servant-server that uses persistent for saving data to a database.
You can build and run the project with stack, e.g.:
stack build
stack exec example-servant-persistent
Then you can query the server from a separate shell:
curl -H 'Content-type: application/json' localhost:3000/user --data '{"name": "Alice", "age": 42}'
curl -H 'Content-type: application/json' localhost:3000/user/Alice
Haskell
100.0%
Simple example to illustrate how to use persistent and servant in combination.
Haskell
81
13 commits
updated Jan 4, 2018
This project is a small example for how to set up a web-server with servant-server that uses persistent for saving data to a database.
You can build and run the project with stack, e.g.:
stack build
stack exec example-servant-persistent
Then you can query the server from a separate shell:
curl -H 'Content-type: application/json' localhost:3000/user --data '{"name": "Alice", "age": 42}'
curl -H 'Content-type: application/json' localhost:3000/user/Alice
Haskell
100.0%