Notes - Intro to Node.
Several months ago I went to a 3 hour Intro to Node.js workshop through Meetup by Ryan Eastridge of Formidable Labs. Here are the notes I took. Beware - without Ryan's walk-though, some of the stuff here doesn't make much sense.
Node's strength is asynchronicity - there is no halt while waiting for a response.
$ node [filename] #execute that file $ localhost:8000 #from NOT Node console
var fs=require("fs"); fs.writeFileSync("hw.txt", "Hello World"); #Possible, but use async and callbacks.
Modules installed during workshop: Express, Request, Cheerio. Other useful modules: easyxdm, socket.io, simonl. Also github.com/caolan/async; to avoid callback hell - set up in series.
Shouter: process.stdin.resume(); #Don't exit, wait for input