1
0
mirror of https://github.com/comatory/fb2iCal synced 2024-12-12 08:36:10 +01:00
Facebook-Events-iCal-Converter/lib/index.js

23 lines
603 B
JavaScript
Raw Normal View History

const { configureApplication } = require('./app')
const { createAppLogger } = require('./log-utils')
2019-10-23 20:37:06 +02:00
const {
createRouteLogger,
createErrorLogger,
2019-10-23 20:37:06 +02:00
} = require('./middlewares')
2019-10-15 09:22:08 +02:00
const isDevelopment = process.env.NODE_ENV === 'development'
const port = process.env.PORT
2019-10-23 15:15:20 +02:00
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
2019-10-23 22:29:01 +02:00
})
app.listen(port)