Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Validation errors
const { validate } = options.server.routes
if (validate.failAction === undefined) {
validate.failAction = async (_, __, err) => {
if (options.dev) {
consola.error(err + '')
}
throw err
}
}
return options
}
Options.defaults = {
dev: !env.production && !env.test && !env.ci,
relativeTo: '',
routeTable: undefined,
registrations: [],
routes: [],
esm: {},
prefix: '/',
nodemon: {},
devErrors: {
showErrors: undefined,
useYouch: true,
toTerminal: false
},
server: {
cache: null,
port: process.env.PORT || 3000,
host: process.env.HOST || '0.0.0.0',