mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
9 lines
267 B
JavaScript
9 lines
267 B
JavaScript
new node.http.Server(function (req, res) {
|
|
puts("got req to " + req.uri.path);
|
|
setTimeout(function () {
|
|
res.sendHeader(200, [["Content-Type", "text/plain"]]);
|
|
res.sendBody(JSON.stringify(req.uri));
|
|
res.finish();
|
|
}, 1);
|
|
}).listen(8000, "localhost");
|