docs.nestjs.com
docs.nestjs.com copied to clipboard
docs(middleware): adding bodyParser customization documentation
PR Checklist
Please check if your PR fulfills the following requirements:
- [X] The commit message follows our guidelines: https://github.com/nestjs/docs.nestjs.com/blob/master/CONTRIBUTING.md
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [X] Docs
- [ ] Other... Please describe:
What is the current behavior?
Docs missing
Issue Number: https://github.com/nestjs/nest-cli/issues/1740
What is the new behavior?
Docs updated
Does this PR introduce a breaking change?
- [ ] Yes
- [X] No
Other information
Updated and checked the preview, cool pipeline team!
Thanks for taking a look @kamilmysliwiec. Two questions:
- How would I register the bodyparser before calling
NestFactory.create
? - My main difficulty that I'm trying to address in the readme is I wanted to do what applying-middleware describes per route with bodyparser and that's what I'm trying to get across in the doc update. Is there a more accurate phrasing that would work?
How would I register the bodyparser before calling NestFactory.create?
You can register it after calling NestFactory.create
but before app.init()
/app.listen()
Got it, that's good to know but that wouldn't have solved my problem of wanting to use the MiddlewareConsumer
pattern.
I can rework this PR as just warning under MiddlewareConsumer
on using bodyparser as opposed to the more general advice. If that direction isn't acceptable let me know what would be.
Sounds good @sshevlyagin!
👋 @kamilmysliwiec ready for you when you have a chance
@kamilmysliwiec @micalevisk friendly ping
lgtm