refactor(app.js): Extract urlencodedParser to utils module

This commit is contained in:
BoHong Li 2017-04-12 05:31:22 +08:00 committed by Raccoon Li
parent dee77c459a
commit 9f1f16c8e3
2 changed files with 10 additions and 6 deletions

9
lib/web/utils.js Normal file
View file

@ -0,0 +1,9 @@
'use strict'
const bodyParser = require('body-parser')
// create application/x-www-form-urlencoded parser
exports.urlencodedParser = bodyParser.urlencoded({
extended: false,
limit: 1024 * 1024 * 10 // 10 mb
})