http server |node js tutorials

how to write headers 

 const http= require('http');

const server = http.createServer()

const server = http.createServer(()=> {})

console.log(req.method);

req.url


const server = http.createServer((req,res)=> {

res.writeHead(200,{'content-type':'text/html'})

res.writeHead(404{'content-type':'text/html'})- page not found

res.end('<h1> home page</h1>')

})


server.listen(5000)



write fro html page

readfilesync= require('readFIleSync')

const homepage= readfilesync('./index.html')

res.end(homepage)

how to make navbar in html fully good ui

in navbar-app folder

it has styles.css, navbar.js,navbar.html







No comments:

Post a Comment

Event listening in react

 How we can listen to som eevents some envents fire like click or automatically user enters into input button , that is event on word type i...