Conversation
eliasmalik
left a comment
There was a problem hiding this comment.
There are other steps where the body-parser module is referred to, not just step 10. Please make sure you make appropriate changes to those steps as well.
Thanks!
| // parse incoming json | ||
| app.use(bodyParser.json()); | ||
| // parse urlencoded bodies | ||
| app.use(bodyParser.urlencoded({ extended: false })); |
There was a problem hiding this comment.
Have you actually run the code after your changes?
Running this file will result in a ReferenceError because you've removed line 5, where bodyParser is defined, yet still refer to it on line 14.
| const express = require('express'); | ||
| const path = require('path'); | ||
| const favicon = require('serve-favicon'); | ||
| // import 'body-parser' module |
There was a problem hiding this comment.
We still need to import the module. See my comment below to understand why.
There was a problem hiding this comment.
oooops ! sorry I will do it 👍
|
@Marwabj In my review comment I wrote
As mentioned here, step 11, and all steps after it, also use the JSON body parser. We can remove those references just like in step 10. Once you do so I can merge this PR. |
|
Is this outdated, or is this still in review cc: @astroash @shiryz @oliverjam @m4v15 ? |
|
It's been over a year since the last activity so someone else might need to take over if we want to get it merged |
#853