Instructions / notes for running and testing the backend server. MySQL server is hosted on Google Cloud.
- Python 3.6
- pip
- virtualenv
Before running the backend, you must setup a Python virtual environment. These are configured on a per-machine basis, so that is why it is not included in the repository.
Start by creating a virtual environment called 'env' and specifying it to use Python 3
virtualenv --python Python3 env
This will create a folder named /env/ in whatever directory you are in. Don't worry if you are in the repository, the .gitignore is setup to ignore folders with name /env/.
source env/bin/activate
deactivate
Activate your virtual environment and install dependencies for the project.
pip install -r requirements.txt
Activate the sql proxy to allow the server to connect to our MySQL database. Run the .sh file
./run_proxy.sh
First, activate the virtual environment.
source env/bin/activate
Then run the server.
python manage.py runserver
The server is now running on
localhost:8000
- https://www.techiediaries.com/create-react-app-django/
- https://cloud.google.com/python/django/appengine
- https://cloud.google.com/appengine/docs/flexible/python/testing-and-deploying-your-app
- https://console.cloud.google.com/sql/instances?project=freshbudgets
- https://cloud.google.com/appengine/docs/standard/python/config/appref
- https://www.django-rest-framework.org/topics/documenting-your-api/
- https://pypi.org/project/drf-yasg/