413 Entity too large
JS
S
JavaScriptCommon error for large payloads. This snippet tackles the lower layer touch point, the backend App. There is another recipe for the intermediate touch point layer (reverse proxy or web server): NGiNX And a further one for the highest level (Load Balancer or Router)
1var bodyParser = require('body-parser');
2
3var app = express();
4
5// middleware injection
6app.use(bodyParser.json({limit: '50mb'}));
7app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
8
9module.exports = app;
10
11
12/*
13 For NGiNX
14 vi /etc/nginx/nginx.conf
15 client_max_body_size 20MB;
16*/Created on 1/28/2019