Moved utils.js to utils.ts and refactored import and exports

Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
Yannick Bungers 2020-04-12 12:46:41 +02:00 committed by David Mehren
parent ad3e25310a
commit bb8fb93fee
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -1,15 +1,15 @@
'use strict'
const bodyParser = require('body-parser')
import bodyParser from 'body-parser'
// create application/x-www-form-urlencoded parser
exports.urlencodedParser = bodyParser.urlencoded({
export const urlencodedParser = bodyParser.urlencoded({
extended: false,
limit: 1024 * 1024 * 10 // 10 mb
})
// create text/markdown parser
exports.markdownParser = bodyParser.text({
export const markdownParser = bodyParser.text({
inflate: true,
type: ['text/plain', 'text/markdown'],
limit: 1024 * 1024 * 10 // 10 mb