There is code for an example server, client, and documentation located
example/. The following section describes how to run the
The example executables can be built with the following command:
$ stack build --flag servant-rawm:buildexample
After building, the server can be run with the following command:
$ stack exec -- servant-rawm-example-server
This runs a server on port 8201 serving files
It can be accessed from
curl like the following:
$ curl http://localhost:8201/serve-directory/foo.txt This is an example text file.
After building, the client can be run like the following:
$ stack exec -- servant-rawm-example-client Successfully got file ./example/files/foo.txt: This is an example text file.
After building, the documentation can be generated like the following. This is documentation for the API defined in example/Api.hs:
$ stack exec -- servant-rawm-example-docs ...
- Update to work with the latest version of Servant (0.14) and remove support from older versions of Servant.
- Remove support from Stackage LTS versions older than 12.
- Add missing test file to extra-source-files in the cabal file.
- Add tests and more documentation.
- (commit 30a2cd48488d) Add a phantom type to
RawMto allow the user to change the output documentation.
- (commit 30a2cd48488d) Add a
RawMthat uses the
HasDocsinstance for the phantom type.
- Initial release.