System Shock 2 in numbers node.jsexpress.jsimage

disclaimer: this is my first node.js application ever!

####Uses:

  • node.js (0.10.21)
  • express (3.4.5)
  • grunt (0.4.2), with:
    • clean
    • copy
    • jade
    • uglify
  • jade (0.35.0)
  • stylus (0.41.0)

####Includes:

  • jQuery
  • underscore.js
  • backbone.js
  • backbone.marionette
  • backbone.stickit
  • jaderuntime

####Serves as a reference for building the simplest http apps.

important:

This app relies heavily on GRUNT to switch between production and development modes. The repository is always to be kept in development mode with all app (not server) JavaScript files in /public/js.

SWITCHING MODES WITH DIRTY GIT STAGE IS STUPID

Production mode

To switch the app to production mode, use grunt prod, which will backup all source JavaScript files to /src/js direcotry and uglify them into a single /public/js/app.min.js. It will also swap /views/layout.jade file for a production one, which links this uglified file instead of all separate source files.

Development mode

With the app in production mode you can switch back to development mode running grunt dev, which will basically revert the changes and clean the files. You may end up with git showing changes to the JST defining script, but nothing major. These should be safe to both commit or checkout -- ., as they should only differ in time of creation.

SWITCHING MODES WITH DIRTY GIT STAGE IS STUPID