- Note: lab-exercises are in labs-branch
- Demo app running at: http://gaso.kilke.net. If it doesn't work, try alternative link.
- Install MongoDB
- Install nodejs
- Install
coffee-script
globally:npm install coffee-script -g
- Clone gaso repository to your computer
cd gaso
npm install -d
- Use
gasodev.cmd
or./gasodev.sh
- Open browser to
http://localhost:3000
- Use
gaso.cmd
or./gaso.sh
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:
run_tests.cmd
OR
npm install -g vows
vows --spec
ingaso
-dir
To avoid need of re-running node app after each change use nodemon
.
npm install nodemon -g
nodemon app.coffee
To help debugging of the backend use node-inspector
npm install node-inspector -g
- Start node-inspector:
node-inspector
- Run application (from another cmd-shell)
1.
coffee --nodejs --debug app.coffee
OR 1. Use thegasodev.*
start scripts - Open browser to
http://127.0.0.1:8080/debug?port=5858
to 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
gaso/dev/snockets.js
overgaso/node_modules/connect-assets/node_modules/snockets/lib/snockets.js
- 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
devDependencies
in package.json - 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.watchFile(ignoreFilePath...
withfs.watch(ignoreFilePath...
at line 195 of C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules\nodemon\nodemon.js.