
Image Source[/caption]
| Method To Add Node JS Module |
| const http = require('http'); http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/html' }); res.write('Welcome to PW Skills!'); res.end(); }).listen(3000); |
| Node JS Modules | Uses |
| http | creates an HTTP server using Classes, methods, and events in Node.js. |
| Assert | set of assertion functions useful for testing. |
| Fs | used for handling file I/O operations. |
| Path | includes methods to deal with file paths. |
| Process | provides information and control the current Node.js process. |
| OS | provides information about the operating system. |
| Querystring | utility used for parsing and formatting URL query strings. |
| Util | Includes useful utility functions for developers |
| URL | module provides utilities for URL resolution and parsing. |