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