Doc changes for new API (part 1)

This commit is contained in:
Ryan Dahl committed 2010-04-08 15:00:08 -07:00
1 parent b544185bd8
commit 499c615c9e
2 files changed
+404 -328

No files matched your search

+401 -325
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -42,12 +42,12 @@
</p>
<pre>
var sys = require('sys'),
var sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
setTimeout(function () {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.close('Hello World');
res.end('Hello World\n');
}, 2000);
}).listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/');</pre>
@@ -79,7 +79,7 @@ var server = tcp.createServer(function (socket) {
});
socket.addListener("end", function () {
socket.write("goodbye\r\n");
socket.close();
socket.end();
});
});
server.listen(7000, "localhost");</pre>