python, mongodb, flask, fast api
Check version:
python3 --version
Install pip
python3 -m pip install --upgrade pip
Create environment:
python3 -m venv venv
Activate environment:
On Windows:
venv\Scripts\activate
On macOS and Linux:
source venv/bin/activate
pip install fastapi uvicorn
python3 -m venv venv
source venv/bin/activate
python -m pip install 'fastapi[all]' 'pymongo[srv]' python-dotenv uvicorn
mkdir app
cd app
touch main.py routes.py models.py .env
python3 -m uvicorn main:app --reload
pip3 freeze > requirements.txt
git push heroku main
http://localhost:8000/docs
https://sarge-api-23-8cdf3807bdf0.herokuapp.com/docs