Keeping up with technology can be a job in itself. Learning is fun, but is quickly forgotten so writing things down can always save you time later. This thread goes over various was of installing Node.js and other packages.
Installing Node.js
There are 2 ways in which you can install Node.js. Node.js comes with node package manager now so it will not need to be installed independently.
Installer (recommended): Go to node.js.org and use the installer for your OS. Run the installer.
Homebrew (Mac only): Run the command “brew install node”. You will have to have homebrew installed.
Other Node packages t
Installation will use node package manager. You can list the node modules for your node application by listing the directory of “node_modules”.
Express – web application framework for node
npm install -g express --save
NOTE: once you create a application with express (i.e. express AppName) you will have to navigate to AppName folder and run the command “npm install” to install the components defined in node’s package.json.
Yeoman – front end tool focused on scaffolding (yo), building/testing (grunt), and dependency management (bower)
npm install -g yo --save
npm install -g generator-webapp --save
coffee-script – scripting language that builds down to javascript.
npm install coffe-script --save
node-dev – a tool for node that will monitory files and auto restart the node app when a file has changed.
npm install node-dev –save
NOTE: When using this you will want to separate development dependencies from production ones. In the package.json, you can create a “devDependencies” like so:
{
"name": "application-name",
...,
"dependencies": {
"express": "2.5.8",...
},
"devDependencies": {
"node-dev": "~0.2.2"
}
}
mocha – javascript test framework for node
npm install mocha –save
NOTE: put this in your dev dependencies
REQUIRES: request
request – modeule that simplifies the process of making http calls
npm install requets --save
Redis – open source advanced key-value store
npm install redis hiredis connect-redis --save
REQUIRES: Installation of Redis backend. On a Mac use homebew “brew install redis”, Windows see redis.io.
connect-assets – transparent file compilation and dependency management for Node’s connect framework
npm install connect-assets --save
socket-io – simplifies the use of IO on all browsers. See WebSockets for information on this topic.
npm install socket-io --save
AngularJS – front end web application framework dealing with models, views, collections, and events
npm install angular --save
Backbone – front end structured for web applications dealing with models, views, collections, and events
npm install backbone --save
RELATED: Marionettejs (npm install backbone.marionette --save)