You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 7, 2020. It is now read-only.
The parser accepts an options object, one of those options is limit which is a string parsed by the bytes package or a number of bytes. Body parser parses the limit option using the following code:
While it would be nice if all JSON payloads were under 100KB, that won't be the case 100% of the time.
Express 4 uses the body-parser package to decode JSON and Raw payloads which is nice but the default is a bit small for my use case.
The template loads the body-parser package here:
https://github.com/openfaas-incubator/node8-express-template/blob/master/template/node8-express/index.js#L12
The parser accepts an options object, one of those options is
limitwhich is a string parsed by the bytes package or a number of bytes. Body parser parses the limit option using the following code:If you decide to only implement the bytes parser (easy option) it could be a very simple change: