This is a simple flask server meant to be an API for the VTA mtlfs in the proper schema.
Raw data is currently being received with the Express Lanes Api Receiver which writes the data to disk and triggers an update to the data served by the flask server.
The Flask server uses a combination of the dynamic data from the receiver and the static descriptive json data in our mtlfs repo to produce output for the api.
See an example with the discovery json or get the dynamic data directly at the toll status json.
- Get the mtlfs in a directory alongside this repo
- Clone this repo.
- Install the necessary packages(
pip install flask
) to your Python 3 environment. - Add environment variable
export FLASK_APP=server.py
- Turn on debug mode
export FLASK_DEBUG=1
- Run server
flask run
- View at 127.0.0.1:5000
- This guide to get started
- Use nginx
- Use gunicorn to run
gunicorn --bind 0.0.0.0:8000 server:app
- Run the express lanes api with node.
- Serve up both gunicorn and the node server with supervisorctl