Complete the code to import the Express package.
const express = require('[1]');
You import the Express package by requiring 'express'. This allows you to use Express features in your app.
Complete the code to install the 'cors' middleware in the Express app.
const cors = require('[1]');
The 'cors' package is imported by requiring 'cors'. This middleware helps handle Cross-Origin Resource Sharing.
Fix the error in applying the 'cors' middleware to the Express app.
app.use([1]());When using middleware, you pass the middleware function itself to app.use, not the result of calling it. So use app.use(cors()); is correct, but here the blank is for the middleware function name without parentheses.
Fill both blanks to import and use the 'helmet' middleware correctly.
const [1] = require('[2]'); app.use(helmet());
You import the 'helmet' package by requiring 'helmet' and assign it to a variable named 'helmet'. Then you use it with app.use(helmet());.
Fill all three blanks to import, configure, and use the 'body-parser' middleware for JSON data.
const [1] = require('[2]'); app.use([3].json());
You import the 'body-parser' package by requiring 'body-parser' and assign it to a variable named 'bodyParser'. Then you use app.use(bodyParser.json()); to parse JSON request bodies.