|
|
@ -33,15 +33,13 @@ window.onload = function(){generateToc(2)} |
|
|
|
<h2 id="_synopsis">SYNOPSIS</h2> |
|
|
|
<div class="sectionbody"> |
|
|
|
<div class="paragraph"><p>An example of a web server written with Node which responds with "Hello |
|
|
|
World" after waiting two seconds:</p></div> |
|
|
|
World":</p></div> |
|
|
|
<div class="listingblock"> |
|
|
|
<div class="content"> |
|
|
|
<pre><tt>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\n"); |
|
|
|
response.finish(); |
|
|
|
}).listen(8000); |
|
|
|
puts("Server running at http://127.0.0.1:8000/");</tt></pre> |
|
|
|
</div></div> |
|
|
@ -1946,7 +1944,7 @@ init (Handle<Object> target) |
|
|
|
<div id="footer"> |
|
|
|
<div id="footer-text"> |
|
|
|
Version 0.1.11<br /> |
|
|
|
Last updated 2009-09-23 16:52:08 CEST |
|
|
|
Last updated 2009-09-23 16:59:33 CEST |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</body> |
|
|
|