PRACTICAL 5
Create Hello World program using Node.js.THEORY
In this web page, simple Node.js program have been created using localhost server.Node.js has a built-in module called HTTP, which allows Node.js to transfer data over the Hyper Text Transfer Protocol (HTTP).
IMPORTANT TAGS & ATTRIBUTES:
- require(): To include the HTTP module, use the require() method.
- createServer(): Use the createServer()method to create an HTTP server.
- setHeader(): Sets the specified header.
- listen(): The server.listen() method creates a listener on the specified port or path.
- end(): Signals that the server should consider that the response is complete.
SCREENSHOT WEB PAGE:
NAME:AYUSH SINGLA
ID:18CE122
LINK:18ce122.blogspot.com
Comments
Post a Comment