14 lines
455 B
TypeScript
14 lines
455 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule, {
|
|
// Better Auth reads the raw request body; AuthModule parses JSON and
|
|
// form bodies for every other route.
|
|
bodyParser: false,
|
|
});
|
|
app.enableShutdownHooks(); // closes the database pool on SIGTERM/SIGINT
|
|
await app.listen(process.env.PORT ?? 3000);
|
|
}
|
|
await bootstrap();
|