-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from UMC-README/dev
[chore] 서버 배포를 위한 dev to main
- Loading branch information
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
node_modules | ||
.env | ||
db.config.js | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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에 대기할 요청의 개수 한도 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,6 +194,7 @@ paths: | |
type: string | ||
description: JWT 토큰 | ||
|
||
|
||
/user/join-room: | ||
get: | ||
tags: | ||
|