Built with FastAPI. FitMotion-Core is main Backend of FitMotion App.
- Create an environment. It is recommended using pipenv or virtualenv
# using virtualenv
vitualenv .venv
# For Linux
source .venv/bin/activate
# For Windows
.venv\Scripts\activate
# using pipenv
pipenv shell- Install the dependencies
# using pipenv
pipenv install
# using pip
pip install -r requirements.txt- Create new
.env.developmentfile and add following variables:PG_URL,SECRET,ALGORITHM,GOOGLE_APPLICATION_CREDENTIALS,CLOUD_BUCKET. Your.env.developmentfile should look like this.
# .env.development
PG_URL= <database connection string>
SECRET= <secret hex>
ALGORITHM=HS256
GOOGLE_APPLICATION_CREDENTIALS= <location of google cloud storage service account json key>
CLOUD_BUCKET= <bucket name>
- Run the server. You can run the server using the pre-configured
Makefilewith commandmake dev. You can also start the server with uvicorn command.
# hot reload for development
uvicorn src.main:app --reload
# exposed to public for production
uvicorn src.main:app --host 0.0.0.0 --port 0.0.0.0