description of the service here
Follow these steps to start developing. (Ignore the $ signs – they’re there just to denote the beginning of an unprivileged user’s shell line.)
Make sure you’re running on the latest packages
$ sudo apt-get update && sudo apt-get dist-upgrade -y$ sudo apt-get install -y postgresql postgresql-server-dev-9.6 haskell-stack git pwgen zlib1g-dev$ git clone https://github.com/Lasokki/omanet.git
$ cd omanet$ ./initialise.py
$ APP_PASSWORD=$(egrep password config/secret.yml | head -1 | cut -d'"' -f 2 | cut -d":" -f 3)
$ APP_USER=$(egrep user config/secret.yml | head -1 | cut -d'"' -f 2 | cut -d":" -f 3)Create the user and two databases
$ sudo -u postgres createuser $APP_USER
$ sudo -u postgres psql -c "ALTER USER $APP_USER WITH PASSWORD '$APP_PASSWORD';"
$ sudo -u postgres createdb --owner=$APP_USER omanet_dev
$ sudo -u postgres createdb --owner=$APP_USER omanet_testGet GHC and build the dependencies
$ stack build yesod-bin cabal-install --install-ghcIf the stack CDN is ultra slow, use sshuttle to proxy your https:
$ sudo apt-get install -y sshuttle
$ sshuttle -r yourusername@an.ssh.host.you.can.connect.to 0.0.0.0/0 -vvBuild the libraries
$ stack build$ stack testLaunch the development server
$ stack exec -- yesod develThe first run will do things. After it’s done, press enter to rebuild. Then view your development site at http://localhost:3000/
We are building on top of the yesod scaffolding. To add a new handler, quite many places have to be touched. use
$ stack exec -- yesod add-handlerto make it easier.