Team Late's back-end API for bitebody.xyz created with Flask (Python micro-framework).
Created by Bryan Rojas, Hector Mendoza, Malik Coleman, David Ibarra
- 64-bit environment (Trying to make it system agnostic)
- Git
- Ensure git is installed on computer. You can verify by running the following command on your terminal.
git --version
- Clone the GitHub repository.
git clone https://github.com/Bite-Body/bitebody-flask-api.git
- Verify you have Python 3.7.x, open up terminal and run the following command.
python -V
- Change directory (cd) into the project folder.
cd bitebody-flask-api
- Install Python dependencies.
pip install -r requirements.txt
- Running the API server.
python manage.py
- Log into heroku CLI
heroku login
- Login into Heroku containers
heroku container:login
- Heroku push container
heroku container:push web --app gentle-inlet-25364
- Heroku release container
heroku container:release web --app gentle-inlet-25364
- Check logs to verify
heroku logs --tail
Before going through with the steps outlined below, please have a local instance of the application running. Documentation for running locally can be found above in the "Running Application Locally" section of the README. :)
Each of the tables stored in the database can have the API's CRUD operations tested through the command line.
A) To test the USER table follow the following instructions:
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- change directory to test folder (where test files are housed)
cd tests
- run user_Test file
python user_Test.py
B) To test the COLLABORATOR table follow the following instructions:
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- change directory to test folder (where test files are housed)
cd tests
- run user_Test file
python collab_Test.py
C) To test the YOUTUBE VIDEOS table follow the following instructions:
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- change directory to test folder (where test files are housed)
cd tests
- run youtube_video_test file
python youtube_video_Test.py
D) To test the MEAL table follow the following instructions:
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- change directory to test folder (where test files are housed)
cd tests
- run meal_test file
python meal_Test.py
E) To test the WORKOUT table follow the following instructions:
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- change directory to test folder (where test files are housed)
cd tests
- run meal_test file
python workout_Test.py
- Open the Command Prompt on your machine.
- Change directory to backend
cd bitebody-flask-api
- run Test_Tables file
python Test_Tables.py
- Once you start the file running, make sure to press any key whenever text stops appearing on screen. This is meant fo you to proceed whenever you're done reading each table's set of tests.