servant/doc/examples.md

61 lines
2.6 KiB
Markdown
Raw Normal View History

# Example Projects
- **[example-servant-minimal](https://github.com/haskell-servant/example-servant-minimal)**:
2017-11-06 12:08:29 +01:00
A minimal example for a web server written using **servant-server**,
including a test-suite using [**hspec**](http://hspec.github.io/) and
**servant-client**.
2018-05-22 17:20:34 +02:00
- **[servant-examples](https://github.com/sras/servant-examples)**:
Similar to [the cookbook](https://haskell-servant.readthedocs.io/en/latest/cookbook/index.html) but
2018-05-22 17:21:47 +02:00
with no explanations, for developers who just want to look at code examples to find out how to do X or Y
2018-05-22 17:20:34 +02:00
with servant.
- **[stack-templates](https://github.com/commercialhaskell/stack-templates)**
2017-11-06 12:08:29 +01:00
Repository for templates for haskell projects, including some templates using
**servant**. These templates can be used with `stack new`.
2016-04-20 15:53:55 +02:00
2016-04-20 16:04:51 +02:00
- **[custom-monad](https://github.com/themoritz/diener)**:
2016-04-20 15:53:55 +02:00
2017-11-06 12:08:29 +01:00
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](https://github.com/haskell-servant/example-servant-elm)**:
2017-11-06 12:08:29 +01:00
An example for a project consisting of
2017-11-06 12:08:29 +01:00
- a backend web server written using **servant-server**,
- a frontend written in [elm](http://elm-lang.org/) using
[servant-elm](https://github.com/mattjbray/servant-elm) to generate client
functions in elm for the API,
- test-suites for both the backend and the frontend.
2017-05-12 02:20:46 +02:00
- **[servant-purescript](https://github.com/eskimor/servant-purescript/tree/master/examples/central-counter)**:
2017-11-06 12:08:29 +01:00
An example consisting of
2017-05-12 02:20:46 +02:00
- a backend that uses `servant`
2017-11-06 12:08:29 +01:00
- a frontend written in [PureScript](http://www.purescript.org/) using
[servant-purescript](https://github.com/eskimor/servant-purescript) to generate
an API wrapper in PureScript to interface the web API with
2017-05-12 02:20:46 +02:00
- **[example-servant-persistent](https://github.com/haskell-servant/example-servant-persistent)**:
2017-11-06 12:08:29 +01:00
An example for a web server written with **servant-server** and
[persistent](https://www.stackage.org/package/persistent) for writing data
into a database.
- **[full-example-servant-elm-auth-yeshql-postgresql](https://github.com/aRkadeFR/FlashCard)**:
A full open source website written with **servant-server**, yeshql, postgresql and elm 0.19.
2018-07-11 16:51:50 +02:00
- [`import Servant` github search](https://github.com/search?q=%22import+Servant%22+language%3AHaskell&type=Code)
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.