Tell us what’s happening:
I am getting following error when submiited for check.I don’t understand what the error means?
Root level logger middleware should be active.
Your code so far
let express = require('express');
let app = express();
require('dotenv').config();
app.get("/", function(req,res){
res.sendFile(__dirname + "/views/index.html")
})
// app.use("/public", express.static(__dirname + "/public"))
app.use(function(req, res, next){
res.send( console.log(req.method +" "+ req.path +" - "+ req.ip));
})
module.exports = app;
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Challenge Information:
Basic Node and Express - Implement a Root-Level Request Logger Middleware