diff --git a/doc/tutorial/index.rst b/doc/tutorial/index.rst index c72b154d..c47bfd1d 100644 --- a/doc/tutorial/index.rst +++ b/doc/tutorial/index.rst @@ -6,8 +6,11 @@ This is an introductory tutorial to **servant**. Whilst browsing is fine, it mak Any comments, issues or feedback about the tutorial can be submitted to `servant's issue tracker `_. -In fact, the whole tutorial is a `cabal `_ -project and can be built and played with locally as follows: +cabal-install +-------- + +The whole tutorial is a `cabal `_ +project and can be built locally as follows: .. code-block:: bash @@ -18,6 +21,20 @@ project and can be built and played with locally as follows: # load in ghci to play with it $ cabal new-repl tutorial +stack +-------- + +The servant `stack `_ template includes the working tutorial. To initialize this template, run: + +.. code-block:: bash + + $ stack new myproj servant + $ cd myproj + # build + $ stack build + # start server + $ stack exec myproj-exe + The code can be found in the `*.lhs` files under `doc/tutorial/` in the repository. Feel free to edit it while you're reading this documentation and see the effect of your changes.