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:
# POST /users
curl --request POST --header "Content-Type: application/json" \
--data '{"username": "alice", "email": "alice@me.com", "password": "ninjas"}' \
http://localhost:3000/users
# GET /users/:username
curl --request GET --header "Content-Type: application/json" \
http://localhost:3000/users/alice