var http=require(“http”); //获得http模板
var querystring=require(“querystring”);
var server=http.createServer(
function(req,res)
{
console.log(“2”);
var post=’’;
req.on('data’,function(chunk){
post+=chunk;
console.log(“3”);
}
);
req.on('end’,function(){
console.log(“4”);
post=querystring.parse(post);
console.log(“5”);
res.write(post.name);
res.write(post.pass);
res.end();
console.log(“6”);
}
);
}
).listen(8888);
console.log(“7”);