first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const logger = (req, res, next) => {
|
||||
const time = new Date().toUTCString();
|
||||
console.log(
|
||||
`---------------------------------------------------------------\n${time}`,
|
||||
JSON.stringify({
|
||||
method: req.method,
|
||||
path: req.path,
|
||||
...req.headers,
|
||||
})
|
||||
);
|
||||
next();
|
||||
};
|
||||
|
||||
module.exports = logger;
|
||||
Reference in New Issue
Block a user