servant/doc/examples.md
2018-07-11 16:51:50 +02:00

2.4 KiB

Example Projects

  • example-servant-minimal:

    A minimal example for a web server written using servant-server, including a test-suite using hspec and servant-client.

  • servant-examples:

    Similar to the cookbook but with no explanations, for developers who just want to look at code examples to find out how to do X or Y with servant.

  • stack-templates

    Repository for templates for haskell projects, including some templates using servant. These templates can be used with stack new.

  • custom-monad:

    A custom monad that can replace IO in servant applications. It adds among other things logging functionality and a reader monad (for database connections). A full usage example of servant/diener is also provided.

  • example-servant-elm:

    An example for a project consisting of

    • a backend web server written using servant-server,
    • a frontend written in elm using servant-elm to generate client functions in elm for the API,
    • test-suites for both the backend and the frontend.
  • servant-purescript:

    An example consisting of

    • a backend that uses servant
    • a frontend written in PureScript using servant-purescript to generate an API wrapper in PureScript to interface the web API with
  • example-servant-persistent:

    An example for a web server written with servant-server and persistent for writing data into a database.

  • import Servant github search

    It has thousands of results and can be a good way to see how people use servant in their projects or even to discover servant-related libraries.