From ada194e15b1d00afbe9b3996210fae07b70b2374 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Fri, 24 Nov 2023 03:24:15 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=EB=B0=B0=ED=8F=AC=EB=A5=BC=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 배포 시 사용하는 페이지를 만듬 --- BE/musicspot/public/release.html | 15 +++++++++++++++ BE/musicspot/src/app.module.ts | 4 +++- BE/musicspot/src/main.ts | 3 ++- .../src/releasePage/release.controller.ts | 13 +++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 BE/musicspot/public/release.html create mode 100644 BE/musicspot/src/releasePage/release.controller.ts diff --git a/BE/musicspot/public/release.html b/BE/musicspot/public/release.html new file mode 100644 index 0000000..4400008 --- /dev/null +++ b/BE/musicspot/public/release.html @@ -0,0 +1,15 @@ + + + + + + 배포 페이지 + + + 0.0 + - 배포 2023.11.24 + + diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index b47923c..efd06f9 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -6,6 +6,8 @@ import { JourneyModule } from './journey/module/journey.module'; import { SpotModule } from './spot/module/spot.module'; import { UserModule } from './user/module/user.module'; import * as dotenv from 'dotenv'; + +import { ReleaseController } from './releasePage/release.controller'; dotenv.config(); @Module({ @@ -17,7 +19,7 @@ dotenv.config(); UserModule, SpotModule, ], - controllers: [AppController], + controllers: [AppController, ReleaseController], providers: [AppService], }) export class AppModule {} diff --git a/BE/musicspot/src/main.ts b/BE/musicspot/src/main.ts index 4731111..eab98e7 100644 --- a/BE/musicspot/src/main.ts +++ b/BE/musicspot/src/main.ts @@ -2,8 +2,9 @@ import { NestFactory } from '@nestjs/core'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { AppModule } from './app.module'; import { ValidationPipe } from '@nestjs/common'; +import { NestExpressApplication } from '@nestjs/platform-express'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() .setTitle('Music Spot') // 문서의 제목 .setDescription('iOS01 Music Spot App API') // 문서의 간단한 설명 diff --git a/BE/musicspot/src/releasePage/release.controller.ts b/BE/musicspot/src/releasePage/release.controller.ts new file mode 100644 index 0000000..f9b8c44 --- /dev/null +++ b/BE/musicspot/src/releasePage/release.controller.ts @@ -0,0 +1,13 @@ +import { Controller, Get, Render, Res } from '@nestjs/common'; +import { Response } from 'express'; +import * as fs from 'fs'; +import { join } from 'path'; +@Controller('release') +export class ReleaseController { + @Get() + sendReleasePage(@Res() res: Response) { + res + .status(200) + .sendFile(join(__dirname, '..', '..', 'public', 'release.html')); + } +}