Skip to content

Commit

Permalink
Merge pull request #137 from boostcampwm2023/release/feature/#135
Browse files Browse the repository at this point in the history
�ipa와 Menifest를 포함한 html을 생성한다.
  • Loading branch information
Dltmd202 authored Nov 16, 2023
2 parents e4e031c + 97e86e7 commit c583d95
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
10 changes: 10 additions & 0 deletions BE/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>Home</title>
<meta charset="UTF-8">
</head>
<body>
<p>모티 앱 v0.0 <a href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/motimate-deploy/manifest.plist">Download</a></p>
<p>Last updated: 2023-11-16 23:18</p>
</body>
</html>
6 changes: 5 additions & 1 deletion BE/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ import { MotimateExceptionFilter } from './common/filter/exception.filter';
import { UnexpectedExceptionFilter } from './common/filter/unexpected-exception.filter';
import { ValidationPipe } from '@nestjs/common';
import { validationPipeOptions } from './config/validation';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.useGlobalPipes(new ValidationPipe(validationPipeOptions));
app.useGlobalFilters(
new UnexpectedExceptionFilter(),
new MotimateExceptionFilter(),
);

app.useStaticAssets(join(__dirname, '..', 'public'));
app.setBaseViewsDir(join(__dirname, '..', 'views'));
swaggerConfig(app);
await app.listen(3000);
}
Expand Down
10 changes: 10 additions & 0 deletions BE/src/operate/controller/operate-mvc.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Controller, Get, Res } from '@nestjs/common';
import { Response } from 'express';

@Controller('operate')
export class OperateMvcController {
@Get()
async getOperate(@Res() res: Response) {
res.sendFile('index.html', { root: 'public' });
}
}
3 changes: 2 additions & 1 deletion BE/src/operate/operate.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { OperateController } from './controller/operate.controller';
import { OperateService } from './application/operate.service';
import { CustomTypeOrmModule } from '../config/typeorm/custom-typeorm.module';
import { MotiPolicyRepository } from './entities/moti-policy.repository';
import { OperateMvcController } from './controller/operate-mvc.controller';

@Module({
controllers: [OperateController],
controllers: [OperateController, OperateMvcController],
providers: [OperateService],
imports: [CustomTypeOrmModule.forCustomRepository([MotiPolicyRepository])],
})
Expand Down

0 comments on commit c583d95

Please sign in to comment.