Name: example-servant-minimal
Owner: servant
Description: A minimal example for a REST-API-server written with servant and a test-suite using servant-client
Created: 2016-04-15 07:50:14.0
Updated: 2018-04-24 19:40:15.0
Pushed: 2017-04-23 20:41:40.0
Homepage: null
Size: 6
Language: Haskell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a very minimal example of a project that uses
servant
to specify a REST API,servant-server
to implement a server,hspec
and servant-client
for the test-suite.To set up the project and run the test-suite, do:
k setup
k test --fast
To execute the test-suite faster while developing, do:
d go-w .ghci .
k exec ghci test/Spec.hs
and then at the ghci
prompt do:
n
to run the tests and
n
to reload the code (after making changes) and run the tests again.
To run the app, do:
k exec example-servant-minimal
Then you can query the server like this:
localhost:3000/item