access language in request express

// Step 1: Import the Express module
const express = require('express');

// Step 2: Create an Express application
const app = express();

// Step 3: Define a route with a callback function
app.get('/hello', (req, res) => {
  // Step 4: Access language from the request query parameters
  const language = req.query.language || 'English';

  // Step 5: Send a response with the accessed language
  res.send(`Hello in ${language}`);
});

// Step 6: Set up the server to listen on a specific port
const port = 3000;
app.listen(port, () => {
  console.log(`Server is listening on port ${port}`);
});