File size: 591 Bytes
1fe7075
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import 'dotenv/config';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module.js';
import { setupApp } from './app.setup.js';
import { APP_CONFIG } from './config/app-config.js';
import type { AppConfig } from './config/app-config.interface.js';

// rawBody: Stripe webhook signatures are computed over the exact bytes received.
const app = setupApp(await NestFactory.create(AppModule, { rawBody: true }));
app.getHttpAdapter().getInstance().set('trust proxy', true);
app.enableShutdownHooks();
await app.listen(app.get<AppConfig>(APP_CONFIG).port, '0.0.0.0');