completed 3.7 and 3.8
This commit is contained in:
parent
7172413e79
commit
71bde97226
2 changed files with 11 additions and 1 deletions
|
|
@ -5,3 +5,5 @@ Exercises:
|
|||
* [X] 3.4
|
||||
* [X] 3.5
|
||||
* [X] 3.6
|
||||
* [X] 3.7
|
||||
* [X] 3.8
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue