Node.js can be used to develop a web server. Node.js is event-driven, which means it doesn’t wait for the preceding call’s response. The Node.js based servers are fast, don’t need buffering, and transport data in chunks. The createServer() method of the HTTP module can be used to create the server. When someone tries to access port 8080, this procedure is called. The HTTP server should respond with HTML, which should be supplied in the HTTP header.