An example showing how to integrate Node Express, Socket.IO, AngularJS, Twitter Bootstrap and CoffeeScript
CoffeeScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Express Example

This is an example node.js project, written in CoffeeScript and demonstrating how to integrate:

You need both CoffeeScript and Express:

npm install -g coffee-script
npm install -g express

Then you can install the dependency node modules:

npm install .

Build the source CoffeeScript files:

cake build

And then start the server.


Every five seconds, the server uses Socket.IO to push the current time to the client. The client, on receiving the time, adds it to the page in the form of a new Bootstrap Alert widget.

Jade is a good choice for the template engine, because it doesn't use double curly braces for variable expansion. That means its syntax doesn't get in the way of Angular's.

I've focused on making this as minimal as possible, while still demonstrating the full stack.