9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html About Me Freelance web developer at scottmotte.com I like to build things. My latest project is Gumb.io. Twitter: @scottmotte
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html What Serverside Javascript 2009 Most watched GitHub repository Ryan Dahl Asynchronous (Evented everything just liked browser based JavaScript)
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html Why Fast - 6K req/sec for hello world. Ubiquituous Language - Write in JavaScript. Great for real time apps - everything is evented. The Future - the new 'Ruby on Rails' link
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html Installation 1. Go here and download. 2. Follow the install instructions. 3. Revel in how much easier that was than Ruby and Rails has ever been.
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html First program - hello_world.js 1. Create file called hello_world.js with the following code. var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/'); 2. node hello_world.js 3. Browse to http://127.0.0.1:1337 in chrome. 4. Bask in the glory of how much easier than that was than Ruby and Rails has ever been.
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html 4. Enjoy writing your node apps in coffeescript from here forward.
9 file:///Users/scottmotte/code/javascript/node_step_1/presentation/presentation/index.html Next Time NPM - Node Package Manager Deploying to Heroku Frameworks like Express.js Socket.io jQuery in node