feat: 初始化项目

This commit is contained in:
R524809
2026-09-02 17:47:25 +08:00
parent 04c94e75db
commit 1a2caba2b3
51 changed files with 6793 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { Controller, Get, Module } from '@nestjs/common';
@Controller('health')
class HealthController {
@Get()
check() {
return { status: 'ok', service: 'api' };
}
}
@Module({ controllers: [HealthController] })
export class AppModule {}
+12
View File
@@ -0,0 +1,12 @@
import 'reflect-metadata';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module.js';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({ origin: process.env.WEB_ORIGIN ?? 'http://localhost:8100' });
await app.listen(Number(process.env.API_PORT ?? 8200));
}
void bootstrap();