2024-11-23 00:37:22 +00:00
|
|
|
import { NestFactory } from "@nestjs/core";
|
|
|
|
import { AppModule } from "./app.module";
|
2024-11-25 21:55:25 +00:00
|
|
|
import {
|
|
|
|
FastifyAdapter,
|
|
|
|
NestFastifyApplication,
|
|
|
|
} from "@nestjs/platform-fastify";
|
2024-11-23 00:37:22 +00:00
|
|
|
|
|
|
|
async function bootstrap() {
|
2024-11-25 21:55:25 +00:00
|
|
|
const app = await NestFactory.create(AppModule, new FastifyAdapter());
|
|
|
|
|
2024-11-24 01:34:20 +00:00
|
|
|
app.enableCors({
|
2024-11-25 21:55:25 +00:00
|
|
|
origin: "*",
|
2024-11-24 01:34:20 +00:00
|
|
|
});
|
2024-11-25 21:55:25 +00:00
|
|
|
|
|
|
|
await app.listen(process.env.PORT ?? 3000, "0.0.0.0");
|
2024-11-23 00:37:22 +00:00
|
|
|
}
|
|
|
|
bootstrap();
|