Skip to content
This repository

Github repository for the Team 6

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Labs

Gaso

Demo

Installation to local machine

  1. Install MongoDB
  2. Install nodejs
  3. Install coffee-script globally: npm install coffee-script -g
  4. Clone gaso repository to your computer
  5. cd gaso
  6. npm install -d

Starting on local machine

Start in development-mode

  1. Use gasodev.cmd or ./gasodev.sh
  2. Open browser to http://localhost:3000

Start in production-mode

  1. 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.

Tests

To run tests: run_tests.cmd

OR

  1. npm install -g vows
  2. vows --spec in gaso-dir

Tips

To avoid need of re-running node app after each change use nodemon.

  1. npm install nodemon -g
  2. nodemon app.coffee

To help debugging of the backend use node-inspector

  1. npm install node-inspector -g
  2. Start node-inspector: node-inspector
  3. Run application (from another cmd-shell)
    1. coffee --nodejs --debug app.coffee OR
    2. Use the gasodev.* start scripts
  4. Open browser to http://127.0.0.1:8080/debug?port=5858 to see node-inspector debugging console.

Known problems

Libraries

  1. 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.
    1. Install dependencies as instructed in Installation to local machine
    2. Copy & replace patched lib from gaso/dev/snockets.js over gaso/node_modules/connect-assets/node_modules/snockets/lib/snockets.js
  2. nodemon (at least v.0.6.12) won't work in windows with normal syntax, some workarounds:
    1. For this reason we include coffee-script non-globally into devDependencies in package.json
    2. Run app in development mode using nodemon -x .\node_modules\.bin\coffee.cmd app.coffee
  3. 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.
    1. This can be fixed by replacing fs.watchFile(ignoreFilePath... with fs.watch(ignoreFilePath... at line 195 of C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules\nodemon\nodemon.js.
Something went wrong with that request. Please try again.