Skip to content

Instantly share code, notes, and snippets.

@KOBA789
Forked from alice1017/test.js
Created June 17, 2011 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KOBA789/1031497 to your computer and use it in GitHub Desktop.
Save KOBA789/1031497 to your computer and use it in GitHub Desktop.
sample nodejs script
var html = require("http");
var base_header = new Object({
"Content-Type":"text/html;charset=utf-8"
});
var server = html.createServer();
server.on("request",function(req,res){
res.writeHead(200,base_header);
res.end("it works");
});
server.listen(8080, "localhost");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment