ALPHAVIO / WordNook

Dynamically updating blogging website to upload articles and blog posts on various topics, developed using ejs template engine and node js in the backend.
https://word-nook.herokuapp.com/
MIT License
81 stars 176 forks source link

No need to use body-parser when using express version 4.16+ #319

Closed abhay27chauhan closed 3 years ago

abhay27chauhan commented 3 years ago

Proposal

Express version 4.16+, their own body-parser implementation is now included in the default Express package so there is no need for you to download another dependency.

You have added a line to your code that looks like the following:

If you are using Express 4.16+ you can now replace that line with:

abhay27chauhan commented 3 years ago

I am a participant of GSSOC21, so please let me know if this is a valid proposal

github-actions[bot] commented 3 years ago

Hi, thanks for creating your first issue at BlogSite, do read and follow the Code of Conduct and the Contribution Guidelines while contributing.

Pranav016 commented 3 years ago

I agree with you but I think there is no harm in having that package because right now its working fine in production, without out it might or might not.. Closing issue for now, reopen if required.

Pranav016 commented 3 years ago

/reviewed

abhay27chauhan commented 3 years ago

Because now it is inbuilt in express so no need to Install additional dependency and in vs code also it gives warning if you use bodyparser

On Sat, 13 Mar, 2021, 2:49 PM Pranav, @.***> wrote:

I agree with you but I think there is no harm in having that package because right now its working fine in production, without out it might or might not.. Closing issue for now, reopen if required.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ALPHAVIO/BlogSite/issues/319#issuecomment-798007888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKG5GE56ESURVDTNZWHYHDTTDMU2FANCNFSM4ZDQNGBQ .

Pranav016 commented 3 years ago

Because now it is inbuilt in express so no need to Install additional dependency and in vs code also it gives warning if you use bodyparser

Yes, we can remove it somewhere down the line but right now I don't want to break any code in production due to compatibility.