This is a Node.js + Angular 2.0 web application that uses the JSPM package manager to manage server/client dependency libraries, as well as configuring with the SystemJS universal dynamic module loader/transpiler. The server code is written in Javascript (ES5), whereas the client code is written in TypeScript, the preferred language of Angular 2.0.
The primary mechanism of communication between the server and clients is socket.io.
Install Node.js, jspm, Mocha, and forever via Homebrew and npm. Homebrew is a package manager for OS X. Substitute your favorite package manager on other operated systems.
brew install node
npm install -g jspm
npm install -g mocha
npm install -g forever
Install dependencies.
npm install
jspm install
Run the server from an Edison:
node index.js
Run the server outside an Edison (uses a mock Edison connection):
NODE_ENV=local node index.js
Run the integration tests (run this in a new terminal while node is still running).
mocha test.js
Navigate to http://localhost:3000.
Run the Node.js application forever. This must be run at each server start, either from the command line, or set up as a service.
forever start index.js