Skip to content

Commit

Permalink
Merge pull request #487 from boostcampwm2023/be-feature/#486-public-s…
Browse files Browse the repository at this point in the history
…tatic

[feat] static 경로를 public으로 설정
  • Loading branch information
yaongmeow authored Nov 3, 2024
2 parents 560bca7 + 95bc7c4 commit d5aef03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BE/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { setupSwagger } from './swagger/swagger.setting';
import { ValidationPipe } from '@nestjs/common';
import { initializeTransactionalContext } from 'typeorm-transactional';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';

async function bootstrap() {
initializeTransactionalContext();
Expand All @@ -22,6 +23,9 @@ async function bootstrap() {
);
app.setBaseViewsDir(__dirname + '/../views');
app.setViewEngine('ejs');
app.useStaticAssets(join(__dirname, '..', 'static'), {
prefix: `/static`,
});

setupSwagger(app);

Expand Down

0 comments on commit d5aef03

Please sign in to comment.