npm install package --save
will auto add to dependencies- Use an MVC structure
- You can have dependencies just for development
- There are a few higher level frameworks (Tower.js, Geddy, Derby, Locomotive.js) but it seems wise to keep it simple
- Use an MVC structure
- The power of node modules cannot be understated. On the other hand it seems best to limit as much as possible to only required modules
- Get your code clearly organized from the start
- Use an MVC structure
- On OSX, make sure you have xcode command line tools installed (appears to have left my machine during software upgrade or something)
- Run node-dev while testing an application
node-dev app.js
- Express is cool
- Install express globally
npm install -g express
and you probably have to run that with sudo - Jade is a terrible template engine
- Setup an express template
express -e ejs
- Start simple, abstract your code later to reduce callback hell
- Add dependencies to your package.json file, its an object like
"dependencies": { "express":"*" }
- After adding dependencies and saving the package.json file, run
npm install
to set up the modules - The NPM search is lame, it uses Google
- The node.js api docs might make more sense after a while, best to google general questions and use docs for specific details of a package
- Node on OSX is easy to install
- Read some tutorials, book, or watch a video from my friend Joe (http://www.lynda.com/Nodejs-tutorials/Nodejs-First-Look/101554-2.html)