-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore:nodemon 설치 * feat: 소켓 연결 시 마스터, 참여자 sid확인 * chore: .env gitignore 추가 * refactor: 랜덤 포지션을 지정하는 함수 수정 * feat: getSocket 함수 transports에 websocket 추가 --------- Co-authored-by: dooohun <[email protected]>
- Loading branch information
Showing
20 changed files
with
224 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+9.26 MB
...-linux-x64-npm-0.21.5-88079726c4-10c0.zip → ...rwin-arm64-npm-0.21.5-62349c1520-10c0.zip
Binary file not shown.
Binary file renamed
BIN
+9.71 MB
...-linux-x64-npm-0.24.0-744e76a7ed-10c0.zip → ...rwin-arm64-npm-0.24.0-f33b2ff14e-10c0.zip
Binary file not shown.
Binary file added
BIN
+2.09 MB
.yarn/cache/@rollup-rollup-darwin-arm64-npm-4.24.4-8d966911c0-10c0.zip
Binary file not shown.
Binary file removed
BIN
-2.39 MB
.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.24.4-aa41cb1ea5-10c0.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+28.6 KB
.yarn/cache/simple-update-notifier-npm-2.0.0-4d6e5dba61-2a00bd03bf.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -24,3 +24,5 @@ dist-ssr | |
*.sw? | ||
|
||
*storybook.log | ||
|
||
.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
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,10 +1,14 @@ | ||
import { io, Socket } from 'socket.io-client'; | ||
import { getCookie } from './cookie'; | ||
|
||
let socket: Socket | null = null; | ||
|
||
export function getQuizSocket(): Socket { | ||
if (!socket) { | ||
socket = io(`${import.meta.env.VITE_SERVER_URL}/game`); | ||
socket = io(`${import.meta.env.VITE_SERVER_URL}/game`, { | ||
auth: { sid: getCookie('sid') }, | ||
transports: ['websocket'], | ||
}); | ||
} | ||
return socket; | ||
} |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"start": "ts-node src/main.ts", | ||
"start:dev": "ts-node-dev --respawn src/main.ts", | ||
"start:dev": "nodemon --watch src --exec ts-node src/main.ts", | ||
"build": "tsc", | ||
"test": "jest", | ||
"test:e2e": "jest --config ./test/jest-e2e.json" | ||
|
@@ -41,6 +41,7 @@ | |
"@types/node": "^22.8.7", | ||
"@types/supertest": "^6.0.2", | ||
"jest": "^29.7.0", | ||
"nodemon": "^3.1.7", | ||
"supertest": "^7.0.0", | ||
"ts-jest": "^29.2.5", | ||
"ts-node": "^10.9.2", | ||
|
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
Oops, something went wrong.