Skip to content

Commit

Permalink
Merge pull request #44 from UMC-FITple/feat/#43_backend_cicd-8
Browse files Browse the repository at this point in the history
CI/CD 파이프라인 수정-8
  • Loading branch information
seoyeoneel02 authored Aug 15, 2024
2 parents f83e424 + bb8aef4 commit 717c83e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: pnpm ci & pnpm run start
web: pnpm install & pnpm run start
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dotenv.config();

// require('dotenv').config();
const app = express();
const port = 3000;
app.set('port', process.env.PORT || 3000);

app.get('/', (req, res) => {
res.send('환영합니다 핏플 백엔드!');
Expand Down Expand Up @@ -58,6 +58,6 @@ app.use((err, req, res, next) => {
res.status(err.data.status || status.INTERNAL_SERVER_ERROR).send(response(err.data));
});

app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});
app.listen(app.get('port'), () => {
console.log(`Example app listening on port ${app.get('port')}`);
});
7 changes: 7 additions & 0 deletions src/swagger/swagger.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import SwaggerJsdoc from 'swagger-jsdoc';
import path from 'path';
import { fileURLToPath } from 'url';
import dotenv from 'dotenv';

dotenv.config();

// 현재 파일의 URL을 파일 경로로 변환
const __filename = fileURLToPath(import.meta.url);
Expand All @@ -19,6 +22,10 @@ const options = {
{
url: 'http://localhost:3000/',
description: 'Local server'
},
{
url: process.env.DEVELOPMENT_SERVER_URL,
description: 'Development server'
}
],
components: {
Expand Down

0 comments on commit 717c83e

Please sign in to comment.