Closed LucasMonteiro1 closed 5 years ago
Have a look at Express Middleware, have you tried something like this?
const server = require('server');
// Convert an Express to a Server middleware
const morgan = server.utils.modern(require('morgan')({ ... }));
// Add it as you'd add a normal middleware
server({}, morgan, ...);
It worked using the middleware. Thank you for your help!!
Happy to help :)
I tried
and
and
After installing the morgan dependency, I changed the file
server/plugins/express/index.js
, after the linectx.app = ctx.express();
addedctx.app.use(morgan('tiny'));
and it worked.