- Git clone backend repository to your desired folder.
git clone https://github.com/potty10/playbits-backend.git
- Install necessary Python dependencies.
pip install -r requirements.txt
- Create a .env file in the root repository with the following information. To create the MongoDB URI, you can head to MongoDB Atlas (Cloud) to set up your own cluster and obtain the URI, or use
mongodb://localhost:27017if you use MongoDB locally in Docker (below).
OPENAI_API_KEY = <Your OpenAI key here>
MONGO_URI=<Your MongoDB URI here>
DATABASE_NAME=db_local
-
Ensure that you have Docker downloaded.
-
Run MongoDB as container.
docker pull mongodb/mongodb-community-server:latest
docker run --name mongodb -p 27017:27017 -d mongodb mongodb-community-server:latest
- Start running API via FastAPI
uvicorn main:app --reload