adspace
Answer Posted / Mamata Kumari
To create an HTTP server using Node.js without any additional packages, follow these steps:
1. Import the http module.
2. Create a new instance of the http.Server object.
3. Define a request listener function that will handle incoming requests.
4. Pass the request listener function and a port number to the http.Server constructor.
5. Call the listen() method on the created server instance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers