1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-01-31 01:14:48 +01:00

23 lines
603 B
JavaScript

const { configureApplication } = require('./app')
const { createAppLogger } = require('./log-utils')
const {
createRouteLogger,
createErrorLogger,
} = require('./middlewares')
const isDevelopment = process.env.NODE_ENV === 'development'
const port = process.env.PORT
const appLogger = createAppLogger({ dev: isDevelopment })
const errorLogger = createErrorLogger({ dev: isDevelopment })
const routeLogger = isDevelopment ? createRouteLogger({ dev: isDevelopment }) : null
const app = configureApplication({
appLogger,
errorLogger,
routeLogger,
rateLimitEnabled: true
})
app.listen(port)