包含 Turborepo 配置、Next.js 前端骨架、NestJS 后端骨架、Prisma Schema、 共享类型包、Docker Compose 和环境变量模板。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 lines
373 B
TypeScript
13 lines
373 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.setGlobalPrefix('api/v1');
|
|
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
|
|
app.enableCors();
|
|
await app.listen(3001);
|
|
}
|
|
bootstrap();
|