// importsconsthttp=require("http")constfs=require("fs")// file systemconstport=3000constserver=http.createServer(function(req,res){fs.readFile("index.html",function(error,data){if(error){res.writeHead(404)res.write("Error: File not found")}else{res.writeHead(200,{"Content-Type":"text/html"})res.write(data)}}res.end())// res.end()})server.listen(port,function(error){if(error){console.log("Something went wrong: ",error)}else{console.log("Server listening on port "+port)}})