Multiplayer Math Game is an online game, that anyone can play with their friends. The application is Build using the FARM(FastAPI, React, and MongoDB).
Home Page | Lobby Page |
---|---|
Game Page | Results Page |
---|---|
Step 1. Clone the repository
$ git clone git@github.com:RajeshJ3/multiplayer-math-game.git
$ cd multiplayer-math-game
Step 2. Create .env
file in the backend
folder
$ nano .env # save the following credentials into .env file
DB_URL=mongodb+srv://<user>:<password>@<host>/?retryWrites=true&w=majority
DB_NAME=<DB_NAME>
Step 3. Installing dependencies
Backend
$ cd backend
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements.txt
Frontend
$ cd frontend
$ yarn # I used yarn for the development, you can use npm as well
Step 4. Spinning the servers up
Backend
$ cd backend
(env)$ # export the environment variables from .env file
(env)$ # or save the environment variables into your environment
(env)$ python main.py
INFO: Started server process [9267]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Frontend
$ cd frontend
$ yarn start
Now, open http://localhost:3000/ in browser.
- Git
- Python 3.8
- Mongodb cloud
- Node
- yarn/npm
Happy Coding
Cheers