chore: 服务端模块装配与入口更新
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import helmet from 'helmet';
|
||||
import compression from 'compression';
|
||||
import { AppModule } from './app.module';
|
||||
import { runMigrationsOnStartup } from './migration-runner';
|
||||
|
||||
@@ -8,7 +10,9 @@ async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.setGlobalPrefix('api');
|
||||
app.enableCors();
|
||||
app.use(helmet());
|
||||
app.use(compression());
|
||||
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
console.log(`Server running on http://localhost:${process.env.PORT ?? 3000}`);
|
||||
}
|
||||
bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user