Skip to content

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

License

Notifications You must be signed in to change notification settings

haskell-servant/example-servant-persistent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •