Skip to content

Commit

Permalink
✨ 배포를 위한 페이지 구현
Browse files Browse the repository at this point in the history
배포 시 사용하는 페이지를 만듬
  • Loading branch information
twoo1999 committed Nov 23, 2023
1 parent c673e31 commit ada194e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
15 changes: 15 additions & 0 deletions BE/musicspot/public/release.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>배포 페이지</title>
</head>
<body>
<a
href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/-"
>0.0</a
>
<span>- 배포 2023.11.24</span>
</body>
</html>
4 changes: 3 additions & 1 deletion BE/musicspot/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -17,7 +19,7 @@ dotenv.config();
UserModule,
SpotModule,
],
controllers: [AppController],
controllers: [AppController, ReleaseController],
providers: [AppService],
})
export class AppModule {}
3 changes: 2 additions & 1 deletion BE/musicspot/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NestExpressApplication>(AppModule);
const config = new DocumentBuilder()
.setTitle('Music Spot') // 문서의 제목
.setDescription('iOS01 Music Spot App API') // 문서의 간단한 설명
Expand Down
13 changes: 13 additions & 0 deletions BE/musicspot/src/releasePage/release.controller.ts
Original file line number Diff line number Diff line change
@@ -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'));
}
}

0 comments on commit ada194e

Please sign in to comment.