• Stars
    star
    1,738
  • Rank 26,795 (Top 0.6 %)
  • Language
    Haskell
  • Created almost 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Main repository for the servant libraries β€” DSL for describing, serving, querying, mocking, documenting web applications and more!

servant - A Type-Level Web DSL

servant

Getting Started

We have a tutorial that introduces the core features of servant. After this article, you should be able to write your first servant webservices, learning the rest from the haddocks' examples.

The core documentation can be found here. Other blog posts, videos and slides can be found on the website.

If you need help, drop by the IRC channel (#haskell-servant on libera.chat) or mailing list.

Contributing

See CONTRIBUTING.md

Release process outline (by phadej)

  • Update changelog and bump versions in master
    • git log --oneline v0.12.. | grep 'Merge pull request' is a good starting point (use correct previous release tag)
  • Create a release branch, e.g. release-0.13
    • Release branch is useful for backporting fixes from master
  • Smoke test in servant-universe
    • git submodule foreach git checkout master and git submodule foreach git pull to get newest of everything.
    • cabal new-build --enable-tests all to verify that everything builds, and cabal new-test all to run tests
      • It's a good idea to separate these steps, as tests often pass, if they compile :)
    • See cabal.project to selectively allow-newer
    • If some packages are broken, on your discretisation there are two options:
      • Fix them and make PRs: it's a good idea to test against older servant version too.
      • Temporarily comment out broken package
    • If you make a commit for servant-universe, you can use it as submodule in private projects to test even more
  • When ripples are cleared out:
    • git tag -s the release
    • git push --tags
    • cabal sdist and cabal upload

TechEmpower framework benchmarks

We develop and maintain the servant TFB entry in https://github.com/haskell-servant/FrameworkBenchmarks/

To verify (i.e. compile and test that it works)

./tfb --mode verify --test servant servant-beam servant-psql-simple --type json plaintext db fortune

To compare with warp

./tfb --mode benchmark --test warp servant servant-beam servant-psql-simple --type json plaintext db fortune

To compare with reitit (Clojure framework)

./tfb --mode benchmark --test reitit reitit-async reitit-jdbc servant servant-beam servant-psql-simple --type json plaintext db fortune

You can see the visualised results at https://www.techempower.com/benchmarks/#section=test

Nix

A developer shell.nix file is provided in the nix directory

See nix/README.md

More Repositories

1

servant-elm

Automatically derive Elm functions to query servant webservices
Haskell
162
star
2

servant-auth

Haskell
160
star
3

example-servant-elm

Example for a web app with a servant backend and an elm frontend
Haskell
140
star
4

servant-swagger

Swagger for Servant
Haskell
124
star
5

example-servant-persistent

Simple example to illustrate how to use persistent and servant in combination.
Haskell
81
star
6

example-servant-minimal

A minimal example for a REST-API-server written with servant and a test-suite using servant-client
Haskell
58
star
7

servant-swagger-ui

Provide embedded swagger UI for servant and swagger
JavaScript
46
star
8

servant-quickcheck

Haskell
40
star
9

servant-multipart

Support for file uploads in multipart/form-data for servant
Haskell
40
star
10

servant-snap

Snap port of servant-server (WIP)
Haskell
28
star
11

servant-js

Automatically derive javascript functions to query servant webservices.
Haskell
22
star
12

servant-mock

Derive a mock server for free from your servant API types
Haskell
19
star
13

haskell-servant.github.io

servant website
Haskell
18
star
14

servant-dhall

Servant dhall bindings
Haskell
18
star
15

servant-blaze

Haskell
10
star
16

servant-lucid

Haskell
8
star
17

servant-nix

Support for Nix expressions as HTTP request/response bodies in servant, using hnix
Haskell
7
star
18

servant-cassava

Haskell
6
star
19

servant-uverb

deprecated: https://github.com/haskell-servant/servant/pull/1314
Haskell
5
star
20

HaskellSGMeetup2015

Slides for a talk about servant
Haskell
5
star
21

servant-contrib

A collection of user contributions for servant, a Type-Level Web DSL.
Haskell
4
star
22

servant-client-haxl

Haxl-based client functions for servant APIs
Haskell
4
star
23

servant-yaml

Servant support for yaml
Haskell
3
star
24

servant-jsaddle

servant jsaddle client
Haskell
3
star
25

slides-functional-thursday

HTML
2
star
26

servant-bazaar

An example project to illustrate how to package servant combinators
Haskell
2
star
27

cretheus

Haskell
2
star
28

servant-benchmarks

Benchmarks for servant
Haskell
1
star
29

hugsMay2015Berlin

Slides of the talk for the Berlin Haskell User Group
TeX
1
star
30

cufp-2015

Haskell
1
star