- Note: lab-exercises are in labs-branch
Installation to local machine
- Install MongoDB
- Install nodejs
npm install coffee-script -g
- Clone gaso repository to your computer
npm install -d
Starting on local machine
Start in development-mode
- Open browser to
Start in production-mode
Note: After starting the app in production mode in windows (!¤"#3¤#" windows again...?) and when you open the browser to the server you'll pbobably get only "Internal server errror" displayed. -> Refresh the page a couple of times and then everything will work.
To run tests:
npm install -g vows
To avoid need of re-running node app after each change use
npm install nodemon -g
To help debugging of the backend use
npm install node-inspector -g
- Start node-inspector:
- Run application (from another cmd-shell)
coffee --nodejs --debug app.coffeeOR 1. Use the
- Open browser to
http://127.0.0.1:8080/debug?port=5858to see node-inspector debugging console.
- connect-assets v2.1.9 doesn't work too well in windows, it messes up file paths. This is due to a bug in it's dependency library snockets. There's a fix to available to snockets here. Patched snockets for windows is in
dev-folder for your convenience.
- Install dependencies as instructed in Installation to local machine
- Copy & replace patched lib from
- nodemon (at least v.0.6.12) won't work in windows with normal syntax, some workarounds:
- For this reason we include coffee-script non-globally into
- Run app in development mode using
nodemon -x .\node_modules\.bin\coffee.cmd app.coffee
- Also another issue with nodemon (at least in windows) is that nodemon will throw an exception
Error: use fs.watch api instead, when starting nodemon. Nodemon seems to run at least partially nevertheless, but the exception is just annoying.
- This can be fixed by replacing
fs.watch(ignoreFilePath...at line 195 of C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules\nodemon\nodemon.js.