Node js basic structure of creating server A. Method -1 var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello World!'); }).listen(8080); You Might Also Like upload files (form) in node js August 22, 2023 Node js mysql August 23, 2023 Rename file in node js August 22, 2023 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.