const http = require('http');
const fs = require('fs');
const server = http.createServer();
server.on('request',function(req,res){
res.writeHead(200, {'Content-Type': 'text/html;charset=utf-8'});
fs.readFile('./index.html','utf-8',function(err,data){
if(err) console.log(err)
res.write(data)
res.end()
});
});
server.listen(1234,()=>{
console.log('this server is runing on 1234')
});