This project is being done as part of CSE 6324 at UT Arlington.
Follow instructions to install the latest version of python for your platform in the python docs
We recommend working within a virtual environment whenever using Python for projects. This keeps your dependencies for each project separate and organized. Instructions for setting up a virtual environment for your platform can be found in the python docs
Once you have your virtual environment setup and running, install dependencies by navigating to the project directory and running:
pip install -r requirements.txt
This will install all of the required packages we selected within the requirements.txt
file.
-
Flask is a lightweight backend microservices framework. Flask is required to handle requests and responses.
-
SQLAlchemy is the Python SQL toolkit and ORM we'll use handle the lightweight sqlite database. You'll primarily work in app.py and can reference models.py.
From within the project
directory first ensure you are working using your created virtual environment.
To run the server, execute:
export FLASK_ENV=development
flask run
Setting the FLASK_ENV
variable to development
will detect file changes and restart the server automatically.
To run the sample, make sure you have python
and pip
installed.
Run pip install -r requirements.txt
to install the dependencies and run python server.py
.
The app will be served at http://localhost:3000/.
To run the tests, run
python test.py
To host your app follow these steps -
- Create a
Procfile
in the project directory. - Inside the Procfile put the following
web: gunicorn app:app
- Push the entire project to GIT
- Go to Heroku and create a new app
- Link your Github account on heroku
- Link the project Github repo in the Heroku App Settings
- Configure it for auto deployment
- In Heroku App Setting, copy all the
.env
file contents. - Add a hobby dev Postgres server from Heroku addons