총 3개의 서버 존재
- websocket -> 웹소켓 서버
- competition -> 경쟁모드 게임 서버
- cooperation -> 협동 모드 게임 서버
기능 별로 서버를 분리하여 로직 간 간섭을 최소화 하였습니다.
또한 비동기 처리를 위해 FastAPI 프레임워크를 사용하였습니다.
git clone https://github.com/team-koword/server.git
cd servercd websocket
#we use docker, so you have to change below code
if game_mode == "WordCard":
api_host = "http://gameserver:7777/" -> "http://localhost:{port_number}/"
else:
api_host = "http://new_game:7778/" -> "http://localhost:{port_number}/"
#if you want, you can use venv
pip install -r requirements.txt
uvicorn main:app --port {port_number} --reloadcd competition
#if you want, you can use venv
pip install -r requirements.txt
uvicorn main:app --port {port_number} --reloadcd cooperation
#if you want, you can use venv
pip install -r requirements.txt
uvicorn main:app --port {port_number} --reload