Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 603 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 603 Bytes

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