South Of 45
This is the code for the website of GovHackNZ 2017 project South of 45. The R analysis code is also included.
The website has been forked from another project which provides a website scaffold.
The R analysis code is located under the
Development on Mac/Linux is advised as some dependencies are difficult to work with on Windows.
Make sure you have Node Version Manager (nvm) installed.
nvm install 8 to install the latest version of Nodejs. You may want to also set this as your default Node.js version with
nvm alias default 8.
Installation on Windows is a bit tricky and may require some setup currently not described here. The below is an incomplete set of requirements:
Download and install Python 2 (required by
Download and install Microsoft Visual Studio Community (required by
node-gyp on Windows).
See Nodegit for more instructions.
Donwload and install the latest version of Node.js.
Make sure you
npm install or
yarn install to download and install this project's dependencies.
To start the server in development mode, use
npm run dev. The server will start on port
8000 by default, but you can set the
PORT environment variable to change this. You shouldn't need to restart the server in this mode even if you make changes, as the server will update after you save. Some functionality will even update without you having to refresh your browser. If you run into any issues though, it might be a good idea to refresh the page.
Deployment with Docker is on the roadmap.
If you're experiencing an unexplained Node crash when running
npm run dev or
npm run prod on Linux, try
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
See Nodemon#214 for more information.