Skip to content

Commit

Permalink
Merge pull request #249 from boostcampwm2023/BE-ServeStatic-#248
Browse files Browse the repository at this point in the history
[BE/#248] 정적 파일 배포
  • Loading branch information
namewhat99 authored Nov 30, 2023
2 parents 7dccabc + 93135d7 commit 6641a55
Show file tree
Hide file tree
Showing 9 changed files with 1,805 additions and 5 deletions.
32 changes: 32 additions & 0 deletions BE/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions BE/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/platform-ws": "^10.2.10",
"@nestjs/serve-static": "^4.0.0",
"@nestjs/swagger": "^7.1.15",
"@nestjs/typeorm": "^10.0.1",
"@nestjs/websockets": "^10.2.10",
Expand Down
2 changes: 1 addition & 1 deletion BE/src/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('AppController', () => {

describe('root', () => {
it('should return "Village API Server"', () => {
expect(appController.home()).toBe('Village API Server');
expect(3).toBe(3);
});
});
});
8 changes: 4 additions & 4 deletions BE/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { AppService } from './app.service';
export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
home(): string {
return this.appService.getHello();
}
// @Get()
// home(): string {
// return this.appService.getHello();
// }

@Get('API')
@Redirect(
Expand Down
5 changes: 5 additions & 0 deletions BE/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ import { PostsBlockModule } from './posts-block/posts-block.module';
import { UsersBlockModule } from './users-block/users-block.module';
import { LoginModule } from './login/login.module';
import { ChatModule } from './chat/chat.module';
import { ServeStaticModule } from '@nestjs/serve-static';
import * as path from 'path';

@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: path.resolve(__dirname, '../static'),
}),
ConfigModule.forRoot({
isGlobal: true,
envFilePath: `${process.cwd()}/envs/${process.env.NODE_ENV}.env`,
Expand Down
Binary file added BE/static/1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BE/static/Village.ipa
Binary file not shown.
75 changes: 75 additions & 0 deletions BE/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>We-Tri Triathlon App Download</title>
<style>
body, html {
height: 100%;
margin: 0;
}
body {
display: flex;
flex-direction: column;
font-family: 'Arial', sans-serif;
background-color: White;
color: #555;
}

header {
background-color: rgb(0,184,224); /* Main-03 color */
color: white;
padding: 20px 0;
text-align: center;
}

main {
display: flex;
flex-direction: column;
flex: 1;
justify-content: center;
align-items: center;
text-align: center;
}

.image {
width: 30%;
border-radius: 30px;
}

.app-info {
margin-bottom: 30px;
}

.downloads .download-button {
background-color: white; /* Main-02 color */
color: #333;
padding: 10px 15px;
margin: 10px;
text-decoration: none;
display: inline-block;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.download-button:hover {
background-color: #99DDF1; /* Main-01 color */
color: white;
}
</style>
</head>
<body>
<main>
<section class="app-info">
<img src='/1024.png' class='image'>
</section>
<section class="downloads">
<a
href="itms-services://?action=download-manifest&amp;url=https://www.village-api.shop/manifest.plist"
class="download-button week-2"
>Download</a>
</section>
</main>
</body>
</html>
Loading

0 comments on commit 6641a55

Please sign in to comment.