diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-09-23 17:00:20 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-09-23 17:00:20 +0200 |
commit | 2d256f34c5c8aa4243798e228052e7fa2d04632d (patch) | |
tree | 7c4b9b0295ef2ce61807e2cf2df04b0ac6a86b7a /doc/node.1 | |
parent | 8c7babdf10dde35c71d097130daa670cd52d1160 (diff) | |
download | node-new-2d256f34c5c8aa4243798e228052e7fa2d04632d.tar.gz |
Change example at beginning of api.txt
Diffstat (limited to 'doc/node.1')
-rw-r--r-- | doc/node.1 | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/node.1 b/doc/node.1 index bd8e7b6b59..d553bb8630 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -13,17 +13,15 @@ .SH "NAME" node - evented I/O for V8 javascript .SH "SYNOPSIS" -An example of a web server written with Node which responds with "Hello World" after waiting two seconds: +An example of a web server written with Node which responds with "Hello World": .sp .sp .RS 4 .nf node\.http\.createServer(function (request, response) { - setTimeout(function () { - response\.sendHeader(200, {"Content\-Type": "text/plain"}); - response\.sendBody("Hello World"); - response\.finish(); - }, 2000); + response\.sendHeader(200, {"Content\-Type": "text/plain"}); + response\.sendBody("Hello World\en"); + response\.finish(); })\.listen(8000); puts("Server running at http://127\.0\.0\.1:8000/"); .fi |