happs-tutorial-0.2: templates/run-tutorial-locally.st
<h3>Run This Tutorial Locally</h3>
<p> Before going further, you may want to inform yourself about the <a href=/tutorial/prerequisites>basic prerequisites</a>, both knowledge and equipment, you need to make the best use of this tutorial </p>
<p>This tutorial is cabalized. You can install and run it simply by doing: sudo cabal install happs-tutorial. You should then be able to run the resulting binary and view the tutorial offline at http://localhost:5001.</p>
<p>The cabal installation may take up to an hour, mainly because the HAppS-Server installation is slow, but it should succeed in one shot. Incidentally, the fact that installing HAppS takes this long is arguably a <a href="http://code.google.com/p/happs/issues/detail?id=29">bug</a>. Hopefully this situation will be remedied as HAppS matures and, eventually, has an official release</p>
<p>If you've never used cabal install or need more detailed info....</p>
<ul>
<li>Haskell: You need at least ghc 6.8.2 to install HAppS. I installed this with with apt-get install haskell (works for ubuntu hardy heron), and then <a href="http://www.haskell.org/ghc/download.html">upgraded to ghc 6.8.3</a> as this is supposed to have fixed some bugs.</li>
<li>Dependency chasing haskell package installers: you should have the latest versions of cabal and cabal install from <a href="http://hackage.haskell.org/packages/archive/pkg-list.html">hackage</a>. These are already included in the latest version of ghc, or they will be soon. Another reason to upgrade to ghc 6.8.3.</li>
<li>If you want to check out the latest version of this tutorial, install <a href="http://www.darcs.net">Darcs</a> and check out the repo with darcs get http://code.haskell.org/happs-examples</li>
<li>cabal installs the tutorial at /home/yourdir/.cabal/bin/happs-tutorial. In practice, I usually recompile and run changed code by executing ./runServer.sh, in the top project directory.</li>
<li>You should now be able to browse this tutorial offline by running the executable, and opening http://localhost:5001 in your browser.</li>
<li>You may also want to <a href="start-happs-on-boot">start HAppS on boot</a>.</li>
</ul>
<p><a href="/tutorial/start-tutorial">Get started!</a></p>