Simple Snap Example Application
See Setup to set up the application for the first time.
- Run the application (by default compiled in development mode)
- Make changes to the application files
- Reload in the browser, updated files will be compiled automatically
Tests are defined in
make test to compile and run them.
Deployment to Heroku
There is an example
Procfile in the application.
Heroku setup instructions: TBD
Check the required and optional dependencies below, then run:
» make setup
to setup a cabal sandbox and install the required project dependencies.
The project can be build (in
development mode which enables dynamic reloading) by running:
The snap application can then be started by running (listening on port 9000):
» .cabal-sandbox/bin/atlassian-snap-example -p 9000 Listening on http://0.0.0.0:9000/
The example project was setup using:
» ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 » cabal --version cabal-install version 188.8.131.52 using version 184.108.40.206 of the Cabal library
These are not strictly necessary but make life easier.
Compresses the executable.
make dist currently strips debug symbols and compresses the executable.
» brew install upx
make freeze target "freezes" the exact versions of the dependencies selected by cabal-install. The dependency list will be written to
This requires the
cabal-constraints executable to be available:
» cabal install cabal-constraints