拓海 真壁 0fa3b0eff8 Merged PR 3: タスク 1327: DevOpsからRegistryにイメージをプッシュ
## 概要
[タスク 1327: DevOpsからRegistryにイメージをプッシュ](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/OMDSDictation/_workitems/edit/1327)

- AzureDevOpsでデプロイするためにDockerFile等の構成を修正しました。

## レビューポイント
- 情報共有
- コンテナの構成として認識違い、不自然な点はないか

## UIの変更
- なし

## 動作確認状況
- イメージをビルドしてプッシュできることを確認
2023-02-14 04:45:15 +00:00

32 lines
1.0 KiB
TypeScript

import { NestFactory } from '@nestjs/core';
import * as cookieParser from 'cookie-parser';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { LoggerMiddleware } from './common/loggerMiddleware';
async function bootstrap() {
const app = await NestFactory.create(AppModule, {
cors: process.env.CORS === 'TRUE',
});
app.use(new LoggerMiddleware(), cookieParser());
// バリデーター(+型の自動変換機能)を適用
app.useGlobalPipes(new ValidationPipe({ transform: true }));
/*TODO SwaggerUIでの表示はローカルのみにする
下の参考ページのような感じで対応する予定
https://tech.mobilefactory.jp/entry/2019/12/18/180000
*/
const options = new DocumentBuilder()
.setTitle('OMDSOpenAPI')
.setVersion('1.0.0')
.build();
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup('api', app, document);
await app.listen(80);
}
bootstrap();