// Step 1: Import the Express module
const express = require('express');
// Step 2: Create an instance of the Express application
const app = express();
// Step 3: Define a route handler for the root path ('/')
app.get('/', (req, res) => {
res.send('Hello, World!');
});
// Step 4: Specify the port number for the server to listen on (e.g., 3000)
const port = 3000;
// Step 5: Make the application listen for incoming requests on the specified port
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});