Skip to content

Commit

Permalink
logging entry requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Parker committed Mar 17, 2024
1 parent 90a1fe1 commit eddd35d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ app.use(
);

app.use((req, res, next) => {
console.log(`[${uuid()}] ${req.method} ${req.url}`);
express.json()(req, res, (outcome) => {
if (outcome && outcome.status >= 400 && outcome.status <= 500) {
res.sendStatus(500).end();
Expand Down

0 comments on commit eddd35d

Please sign in to comment.