Skip to content

Building and Running

Kevin Hannigan edited this page Mar 23, 2017 · 2 revisions

We use gulp to manage building the project. The general strategy for our build is to move all of the relevant files into a dist/ folder, compiling or altering them as necessary. Some files, like the js and most html files, are simply copied over. The index.html file gets our javascript files injected into it using gulp-inject. The sass files are compiled into css. The configuration file is selected from our config folder based on the environment, and is renamed to config.js instead of config.dev.js or config.prod.js.

After running gulp, you can start the application by running npm start or node dist/server.js. Running node server.js will NOT work.

As a developer, you can use gulp devrun instead of using npm start. This is a gulp task I made which will refresh the server when files change, similar to how django does. It should refresh on any file change, not just server or frontend files. NOTE: I (Kevin) made this task. There is a good chance it does not work. If you think something is not updating automagically while using this, double check the gulpfile, or talk to me about it.

Clone this wiki locally