feat: init

This commit is contained in:
2025-03-18 06:21:27 +08:00
parent 595e8d29dc
commit 16c807b98e
37 changed files with 5349 additions and 69 deletions

View File

@@ -0,0 +1,19 @@
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import path from 'node:path';
@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: path.join(__dirname, '..', 'public'),
serveRoot: '/api/static',
serveStaticOptions: {
cacheControl: true,
maxAge: '1d',
},
})
],
controllers: [],
providers: [],
})
export class AppModule { }

8
apps/mock/src/main.ts Normal file
View File

@@ -0,0 +1,8 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(process.env.port ?? 5001);
}
bootstrap();