2017-04-11 17:31:22 -04:00
|
|
|
'use strict'
|
|
|
|
|
2020-04-12 06:46:41 -04:00
|
|
|
import bodyParser from 'body-parser'
|
2017-04-11 17:31:22 -04:00
|
|
|
// create application/x-www-form-urlencoded parser
|
2020-04-12 06:46:41 -04:00
|
|
|
|
|
|
|
export const urlencodedParser = bodyParser.urlencoded({
|
2017-04-11 17:31:22 -04:00
|
|
|
extended: false,
|
|
|
|
limit: 1024 * 1024 * 10 // 10 mb
|
|
|
|
})
|
2018-01-10 18:51:22 -05:00
|
|
|
|
|
|
|
// create text/markdown parser
|
2020-04-12 06:46:41 -04:00
|
|
|
export const markdownParser = bodyParser.text({
|
2018-01-10 18:51:22 -05:00
|
|
|
inflate: true,
|
|
|
|
type: ['text/plain', 'text/markdown'],
|
|
|
|
limit: 1024 * 1024 * 10 // 10 mb
|
|
|
|
})
|