2017-04-11 21:31:22 +00:00
|
|
|
'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
|
|
|
|
})
|
2018-01-10 23:51:22 +00:00
|
|
|
|
|
|
|
// create text/markdown parser
|
|
|
|
exports.markdownParser = bodyParser.text({
|
|
|
|
inflate: true,
|
|
|
|
type: ['text/plain', 'text/markdown'],
|
|
|
|
limit: 1024 * 1024 * 10 // 10 mb
|
|
|
|
})
|