/nodejs-template

A nodejs template

Primary LanguageCoffeeScript

NodeJS Template

This is a template node project.

Technology Stack

Data Storage

MongoDB - NoSQL database with a javascript interface

Platform

node - Javascript platform to build network applications
express - Minimalist web framework a la Ruby's sinatra

ORM

mongoosejs - Asynchronous object modelling tool for MongoDB

Front-End

less - Superset of CSS that compiles to CSS
coffeekup - HTML builder thact utilizes coffeescript
space-pen - Clientside HTML builder that builds on top of JQuery

Misc

now - Realtime RPC

Testing

mocha - BDD/TDD testing framework similar to Jasmine but modular
chai - BDD/TDD assertion library
sinon - Spy/stubbing/mocking framework

Installation

To get up and running with the project you will need to do the following:

  • Install node and npm.
  • Install supervisor via npm install -g supervisor (make sure npm's bin folder is in your PATH).
  • Install foreman via [sudo] gem install foreman.
  • Install mongodb.
  • Checkout the source code and run npm install.
  • make setup

TODO: Write a script to do installations

Running

To run the app simply use make run or make watch (if you want the server to update when changes happen)

Tests

The tests are written in mocha and follow BDD convention. Use make test to run them.
NOTE: If you add a new directory under tests, you will have to add them to the Makefile (TODO: Write a script to programmatically do this)