Commit aba12449 authored by nanahira's avatar nanahira

read package json for info

parent a6db6491
Pipeline #19579 passed with stages
in 2 minutes and 26 seconds
......@@ -3,6 +3,7 @@ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module';
import { ConfigService } from '@nestjs/config';
import PackageJson from '../package.json';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
......@@ -13,9 +14,9 @@ async function bootstrap() {
app.set('trust proxy', ['172.16.0.0/12', 'loopback']);
const documentConfig = new DocumentBuilder()
.setTitle('app')
.setDescription('The app')
.setVersion('1.0')
.setTitle(PackageJson.name)
.setDescription(PackageJson.description)
.setVersion(PackageJson.version)
.build();
const document = SwaggerModule.createDocument(app, documentConfig);
......
......@@ -11,7 +11,8 @@
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"esModuleInterop": true
"esModuleInterop": true,
"resolveJsonModule": true,
},
"compileOnSave": 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