Complete the code to import the Express module.
const express = require([1]);The Express module is imported using require("express"). This allows you to create an Express app.
Complete the code to create an Express application instance.
const app = [1]();You create an Express app by calling the express() function.
Fix the error in the code to start the server on port 3000.
app.listen([1], () => { console.log('Server running on port 3000'); });
The port number should be a number, not a string. So use 3000 without quotes.
Fill both blanks to define a GET route for the root URL that sends 'Hello World'.
app.[1]('[2]', (req, res) => { res.send('Hello World'); });
The get method defines a GET route. The root URL is '/'.
Fill all three blanks to import Express, create an app, and start the server on port 4000.
const [1] = require('[2]'); const app = [3](); app.listen(4000, () => { console.log('Server started on port 4000'); });
You import Express with require('express'), assign it to express, then call express() to create the app.
