INNER CODE UNIT · TypeScript

serve

dyrector-io/dyrectorio · web/crux/src/main.ts:76

const serve = async () => {
  const app = await NestFactory.create<NestExpressApplication>(AppModule, {
    bufferLogs: true,
    // Using Nestjs Logger Service for default logging
    logger: createLogger(),
  })

  const configService = app.get(ConfigService)
  app.setGlobalPrefix('/api')
  app.enableShutdownHooks()

  // If it's in production, we inject the PinoLogger Logger Service instead of the default one
  // because we need to log in JSON format to stdout
  if (productionEnvironment(configService)) {
    app.useLogger(app.get(PinoLogger))
  }

  // Swagger

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…