The front-end server and client for the Gamefest platform.
- Open a terminal in the directory root
- Install Grunt and its cli for the command line --
npm install g- grunt
thennpm install -g grunt-cli
(usesudo
if on *nix) - Install Bower --
npm install -g bower
(usesudo
if on *nix) - Run
npm install
to download the components needed by npm. - Run
bower install
to download the components needed for the app.
Note: If, upon running grunt
, you get any errors about missing packages you can use npm-install-missing
to ensure everything is installed.
- Install
npm install -g npm-install-missing
- Run
npm-install-missing
There are two environments: dev and prod.
Run grunt server:dev
to start the development environment. This will
- Process your LESS and compile it to
app.css
in the /css folder - Add your bower dependencies to
index.html
in the the appropriate blocks - Annotate your angular js files so they can be safely minified later
- Configure a proxy for the back-end, start the livereload server, and
watch
your project folders - Open a webpage for gamefest
Run grunt server:dist
to generate a production environment. This task will
- Clean the current /dist folder (if any)
- Perform steps 1-3 of
server:dev
- Copy your dev environment to /dist (will create if doesn't exist)
- Execute
usemin
to concatenate and minify your js and css resources as well as configureindex.html
to work with the new environment.
To use the production environment run node server.js --env=prod
from the root directory.
Note: You need to have SSL certs in the root directory AS WELL AS permissions to use ports 80 and 443 to run --env=prod
. If you do not have these you can use omit the flag to run node with dev settings.