-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add body parser middleware component #72
base: master
Are you sure you want to change the base?
Conversation
This raises the question: do we need all the middleware components in this package? The original intention of this library was to move away from the granularity of https://github.com/djdeath/noflo-express and provide higher-level building blocks with application-specific logic delegated to user's code. |
Also, this component should be named |
Fair point. On the other hand, pretty much every Express app is going to want to have body parser set up. |
|
||
c.process (input, output) -> | ||
return unless input.hasData 'app' | ||
limit = if input.hasData('limit') then input.getData('limit') else '1mb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is race-prone, should use return if input.attached('limit').length and not input.hasData('limit')
.
@bergie then we should provide |
No description provided.