servant – A Type-Level Web DSL¶
servant is a set of Haskell libraries for writing type-safe web applications but also deriving clients (in Haskell and other languages) or generating documentation for them, and more.
This is achieved by taking as input a description of the web API as a Haskell type. Servant is then able to check that your server-side request handlers indeed implement your web API faithfully, or to automatically derive Haskell functions that can hit a web application that implements this API, generate a Swagger description or code for client functions in some other languages directly.
If you would like to learn more, click the tutorial link below.
- Structuring APIs
- Using generics
- Serving web applications over HTTPS
- SQLite database
- PostgreSQL connection pool
- Using a custom monad
- Inspecting, debugging, simulating clients and more
- Customizing errors from Servant
- Listing alternative responses and exceptions in your API types
- Basic Authentication
- Streaming out-of-the-box
- Combining JWT-based authentication with basic access authentication
- Hoist Server With Context for Custom Monads
- File Upload (
- Generating mock curl calls
- Error logging with Sentry
- How To Test Servant Applications
- OpenID Connect
- Helpful Links