Complete the code to add a middleware that logs every request.
app.use([1]);The loggerMiddleware logs every request. It should be added with app.use() to run on all requests.
Complete the code to parse JSON bodies in requests.
app.use([1]);express.json() is middleware that parses JSON request bodies. It should be added before routes that need to read JSON data.
Fix the error in middleware order to ensure errorHandler catches errors.
app.use(router);
app.use([1]);Error handling middleware must be added after all route handlers to catch errors properly.
Fill both blanks to add JSON parsing and routing middleware in correct order.
app.use([1]); app.use([2]);
JSON parsing middleware must come before routing middleware so routes can access parsed data.
Fill all three blanks to add logging, JSON parsing, and error handling middleware in correct order.
app.use([1]); app.use([2]); app.use([3]);
Logging middleware should run first, then JSON parsing, then error handling last.