Sprawdź Env

console.log(app.get('env'))

if(app.get('env').toLowerCase()==="development"){
    app.use(morgan("dev"))
}
Rasel Hossain