Introduction
The http module is the official Node.js module for creating web servers, enabling front-end developers to quickly start with server-side development. This challenge involves creating a simple application using this module.
Create an HTTP Server
Open the editor on the right. You should see a file named app.js in your editor.
Requirements
- Create a server by writing code in
app.jsthat runs on port8080. - The server should respond with "hello world" to all incoming requests.
- Start the server by running
node app.jsin the terminal.
Example
After completing the task, the service should be running on port 8080. Open "Web 8080" at the top of the VM and refresh it manually. You should see "hello world" displayed on the screen.

Summary
This challenge involves creating a basic HTTP server using Node.js. The server listens on port 8080 and responds with "hello world" to any incoming request.
To complete this task, you need to:
- Import the
httpmodule. - Use the
createServermethod to instantiate the server. - Define a callback function that sends "hello world" as the response.
- Use the
listenmethod to make the server listen on port 8080.
This challenge demonstrates fundamental concepts of creating an HTTP server with Node.js, including request handling and response generation in web development.



