first commit

This commit is contained in:
solehudin5699
2022-02-27 22:27:22 +07:00
commit 7761501545
7 changed files with 452 additions and 0 deletions
+14
View File
@@ -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;