haskell-servant/example-servant-persistent

Simple example to illustrate how to use persistent and servant in combination.

Haskell

81

13 commits

updated Jan 4, 2018

See the code

README

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

Contributors

soenkehahn

10 commits

andys8

1 commits

mchaver

1 commits

haskell-servant/example-servant-persistent

Simple example to illustrate how to use persistent and servant in combination.

Haskell

81

13 commits

updated Jan 4, 2018

See the code

README

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

Contributors

soenkehahn

10 commits

andys8

1 commits

mchaver

1 commits

Languages

Haskell

100.0%