first node prog using express
// Importing necessary modules
const express = require('express');
// Creating an instance of Express
const app = express();
// Creating a route handler for GET requests to the root URL ('/')
app.get('/', (req, res) => {
res.send('Hello, World!'); // Sending 'Hello, World!' as the response
});
// Listening on a specified port (3000 in this case)
app.listen(3000, () => {
console.log('Server is running on port 3000'); // Logging a message when the server starts
});