Before we get started, there is a quickstart on the
here that goes
barebones scaffold project a bit. This course
will go a little more in depth into the
exploring user authentication.
I use hsenv to create separate Haskell environments, but that is not a requirement and beginners may be more comfortable installing the Haskell Platform
If you wish to use hsenv, you can run this on newer versions:
or download the package for ghc-7.6.3 here and run this:
From here on out the process is the same if you’re using hsenv or not. Create a new directory named “abc” and enter it. This will also function as the name of our project and executable.
mkdir abccd abc
It’s good to update the package list when starting a new project:
cabal updatecabal install cabal-install
After updating and installing the new version of cabal-instal we can install snap:
cabal install snap
At this point we will have the
snap CLI and can run init
to scaffold a default project. After scaffolding, we then
cabal install to compile the binary and
abc to run
abc will also take a port as such:
abc -p 8000
snap initcabal installabc -p 8000
Our app, abc, should now be running. Navigate to
localhost:8000 (or the port you specified) in your browser
to take a look.
In the next post we’ll take a look at the code we generated and take a brief overview of what it does.