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(APP_CONFIG).port, '0.0.0.0');