first npm init
second npm i express nodemon


const http = require("http");
const fs = require("fs");

const home = fs.readFileSync("./index.html", "utf-8");
const server = http.createServer((req, res) =>{
    if(req.url === "/"){
     return   res.end(home);
    }
   
});

const PORT = 4000;
const hostname = "localhost";

server.listen(PORT, hostname, () =>{
    console.log("Server is working");
});