From 869db3c92dac5b4cd1c2790dcd53eb369120ba89 Mon Sep 17 00:00:00 2001 From: briandennis Date: Thu, 14 Sep 2017 21:21:18 -0500 Subject: [PATCH] up max payload size to 5mb for twitter api --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index fe8d2f4..9b53544 100644 --- a/server.js +++ b/server.js @@ -20,6 +20,9 @@ app.prepare() server.use(morgan('tiny')) + server.get('/about', (req, res) => + app.render(req, res, '/about')) + // if root, render webpage from next server.get('*', (req, res) => app.render(req, res, '/', req.query)) @@ -29,7 +32,7 @@ app.prepare() // api endpoints server.post('/upload', bodyParser.json(), wrap(require('./handlers/upload'))) - server.post('/twitter', bodyParser.json(), require('./handlers/twitter')) + server.post('/twitter', bodyParser.json({ limit: '5mb' }), require('./handlers/twitter')) server.listen(3000, (err) => { if (err) throw err