on 78034cd help sign in
servant/doc/tutorial/install.rst
42 lines 1.1 kB history raw
1Install
2========
4cabal-install
5--------
7The whole tutorial is a `cabal <https://cabal.readthedocs.io/en/latest/>`_
8project and can be built locally as follows:
10.. code-block:: bash
12 $ git clone https://github.com/haskell-servant/servant.git
13 $ cd servant
14 # build
15 $ cabal new-build tutorial
16 # load in ghci to play with it
17 $ cabal new-repl tutorial
19stack
20--------
22The servant `stack <https://docs.haskellstack.org/en/stable/README/>`_ template includes the working tutorial. To initialize this template, run:
24.. code-block:: bash
26 $ stack new myproj servant
27 $ cd myproj
28 # build
29 $ stack build
30 # start server
31 $ stack exec myproj-exe
33The code can be found in the `*.lhs` files under `doc/tutorial/` in the
34repository. Feel free to edit it while you're reading this documentation and
35see the effect of your changes.
37nix
38--------
40`Nix <https://nixos.org/nix/>`_ users should feel free to take a look at
41the `nix/shell.nix` file in the repository and use it to provision a suitable
42environment to build and run the examples.