completed 3.7 and 3.8

This commit is contained in:
counterweight 2025-06-01 18:55:35 +02:00
parent 7172413e79
commit 71bde97226
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 11 additions and 1 deletions

View file

@ -5,3 +5,5 @@ Exercises:
* [X] 3.4
* [X] 3.5
* [X] 3.6
* [X] 3.7
* [X] 3.8

View file

@ -8,7 +8,15 @@ const unknownEndpoint = (request, response) => {
app.use(express.json());
app.use(morgan("tiny"));
morgan.token("reqBody", (req) => {
return JSON.stringify(req.body);
});
app.use(
morgan(
":method :url :status :res[content-length] - :response-time ms - :reqBody"
)
);
const persons = [
{