const queryString=require('querystring')
const url=require('url')
const fs=require('fs')
const http=require('http')
let server=http.createServer(function (req,res) {
let obj=url.parse(req.url);
let htmlPath=__dirname+"/public"+obj.pathname;
let input=fs.createReadStream(htmlPath);
input.pipe(res)
})
server.listen(8000,function (err) {
if(!err) console.log("start at 8000")
})