// For the logger
app.use(morgan('combined', { stream: logger.stream }))
// For body requests
-app.use(bodyParser.json())
+app.use(bodyParser.json({ limit: '500kb' }))
app.use(bodyParser.urlencoded({ extended: false }))
// Validate some params for the API
app.use(expressValidator({
- customValidators: customValidators
+ customValidators: Object.assign(
+ {},
+ customValidators.misc,
+ customValidators.pods,
+ customValidators.users,
+ customValidators.videos
+ )
}))
// ----------- Views, routes and static files -----------