Skip to content

A Haskell web app that runs in production... because the Vandy Man can!

License

Notifications You must be signed in to change notification settings

TheBizzle/Vandyland

Repository files navigation

Vandyland

Installation Instructions

  • If your machine doesn't already have it, you might need to install libgmp
  • Download Stack
  • Download Postgresql (this tends to be the most troublesome part)
    • Vandyland hasn't been tested with any Postgres version but Postgres 9, so use other versions at your own risk
    • After you think you've gotten Postgres set up, ensure that psql --version and pg_config --version print version numbers; if not, your installation is probably broken
    • Ensure that that the Postgres server is running by performing ps aux | grep postgres and looking for a postgres process; if not, you need to launch the server, which can be done by running pt_ctl start (or these instructions)
    • If you get an error in the coming steps that says "Missing C library: pq", you need to get Postgres stuff onto your PATH; on Red Hat, this can be accomplished by installing postgresql*-devel through yum; on Ubuntu, it can be something more like apt install postgresql-server-dev-9.6
  • Next, you'll need to initialize the Postgres database tables. From the command prompt, run psql --username=postgres and then CREATE DATABASE vandyland WITH ENCODING='UTF8' CONNECTION LIMIT=-1; and then CREATE DATABASE badgerstate WITH ENCODING='UTF8' CONNECTION LIMIT=-1;.
  • At the root of the repository, add the files .db_username and .db_password. The former should contain your Postgres username (default: postgres), and the latter your Postgres password (default: <empty string>).
  • Run the command stack install happy to ensure that the Happy build tool is available for the dependencies

Running

  • To run the server without HTTP, run stack build && stack exec vandyland

  • For HTTPS support, ensure that your SSL cert is accessible and run this command: stack build && sudo /PATH/TO/STACK/stack exec --allow-different-user vandyland -- --port=80 --ssl-port=443 --ssl-cert=/PATH/TO/CERT/cert.pem --ssl-key=/PATH/TO/KEY/privkey.pem --ssl-address=0.0.0.0 --no-ssl-chain-cert (your filenames for the key and cert may differ)

API Docs

Web API docs can be found here.

About

A Haskell web app that runs in production... because the Vandy Man can!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages