Commit 616e19de authored by nanahira's avatar nanahira

Revert "read package json for info"

This reverts commit accc30ee.
parent accc30ee
Pipeline #19595 passed with stages
in 1 minute and 42 seconds
...@@ -3,22 +3,18 @@ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; ...@@ -3,22 +3,18 @@ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { NestExpressApplication } from '@nestjs/platform-express'; import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module'; import { AppModule } from './app.module';
import { ConfigService } from '@nestjs/config'; import { ConfigService } from '@nestjs/config';
import PackageJson from '../package.json';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule); const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.setGlobalPrefix('api'); app.enableCors();
if (process.env.NODE_ENV !== 'production') {
app.enableCors();
}
app.set('trust proxy', ['172.16.0.0/12', 'loopback']); app.set('trust proxy', ['172.16.0.0/12', 'loopback']);
const documentConfig = new DocumentBuilder() const documentConfig = new DocumentBuilder()
.setTitle(PackageJson.name) .setTitle('app')
.setDescription(PackageJson.description) .setDescription('The app')
.setVersion(PackageJson.version) .setVersion('1.0')
.build(); .build();
const document = SwaggerModule.createDocument(app, documentConfig); const document = SwaggerModule.createDocument(app, documentConfig);
SwaggerModule.setup('docs', app, document); SwaggerModule.setup('docs', app, document);
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
"outDir": "./dist", "outDir": "./dist",
"baseUrl": "./", "baseUrl": "./",
"incremental": true, "incremental": true,
"esModuleInterop": true, "esModuleInterop": true
"resolveJsonModule": true
}, },
"compileOnSave": true, "compileOnSave": true,
"allowJs": true "allowJs": true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment