// Import the Express module
const express = require('express');
// Create an instance of the Express application
const app = express();
// Create a router using the express.Router() method
const router = express.Router();
// Define a route handler for the root path '/'
router.get('/', (req, res) => {
res.send('Hello, this is the root path!');
});
// Define a route handler for the '/about' path
router.get('/about', (req, res) => {
res.send('Welcome to the About page!');
});
// Mount the router at the '/app' path
app.use('/app', router);
// Start the Express server on port 3000
app.listen(3000, () => {
console.log('Server is running on port 3000');
});