var http = require("http")
var path = require("path")
var fs = require("fs")
var url = require("url")
var server = http.createServer(function(req, res){
console.log(req)
console.log(res)
function staticRoot(){
fs.readFile("./hello.html",function (err,fileContent){
if(err){
console.log(404)
res.writeHead(404,"not found")
res.end()
}else{
res.writeHead(200, "OK")
console.log("OK")
res.write(fileContent)
res.end()}
})}})
// var pathObj = url.parse(req.url, true)
// console.log(pathObj)
// console.log("~")
// console.log(req)
server.listen(8080)
console.log("~")