How to stop writing spaghetti code - JSConf.eu 2010
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

How to stop writing spaghetti code - JSConf.eu 2010

  • 5,633 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,633
On Slideshare
5,493
From Embeds
140
Number of Embeds
6

Actions

Shares
Downloads
58
Comments
0
Likes
6

Embeds 140

http://lanyrd.com 59
http://speakerrate.com 39
http://developer.yahoo.com 34
https://developer.yahoo.com 4
http://static.slidesharecdn.com 3
http://paper.li 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide






















Transcript

  • 1. EE = require('events').EventEmitter; ee = new EE(); die = false; ee.on('die', function() { die = true; }); setTimeout(function() { ee.emit('die'); }, 100); while(!die) { } console.log('done');
  • 2. var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(8124, "127.0.0.1"); console.log('Server running at http://127.0.0.1:8124/'
  • 3. http.createServer(function (req, res) { })
  • 4. var server = Server.createServer(server.createReq(req, res));