Skip to content

Commit

Permalink
Merge pull request #37 from UMC-README/dev
Browse files Browse the repository at this point in the history
[chore] 서버 배포를 위한 dev to main
  • Loading branch information
JJHyeok13 authored Jul 27, 2024
2 parents 24fa988 + 3621095 commit fef55e7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
.env
db.config.js
.env
17 changes: 17 additions & 0 deletions config/db.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import mysql from "mysql2/promise";
import dotenv from "dotenv";

dotenv.config();

export const pool = mysql.createPool({
host: process.env.DB_HOST || "localhost", // mysql의 hostname
user: process.env.DB_USER || "root", // user 이름
port: process.env.DB_PORT || 3306, // 포트 번호
database: process.env.DB_TABLE || process.env.LOCAL_DB_TABLE, // 데이터베이스 이름
password: process.env.DB_PASSWORD || process.env.LOCAL_DB_PASSWORD, // 비밀번호
waitForConnections: true,
// Pool에 획득할 수 있는 connection이 없을 때,
// true면 요청을 queue에 넣고 connection을 사용할 수 있게 되면 요청을 실행하며, false이면 즉시 오류를 내보내고 다시 요청
connectionLimit: 10, // 몇 개의 커넥션을 가지게끔 할 것인지
queueLimit: 0, // getConnection에서 오류가 발생하기 전에 Pool에 대기할 요청의 개수 한도
});
1 change: 1 addition & 0 deletions swagger/user.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ paths:
type: string
description: JWT 토큰


/user/join-room:
get:
tags:
Expand Down

0 comments on commit fef55e7

Please sign in to comment.