-
Request 511 api key from https://511.org/open-data/token
-
Create
data.yaml
file in theserver
folder of this project
api_key: <YOUR API KEY from #1>
stops:
- operator: SC
name: 10th & Taylor
id: 64995
- operator: BA
name: Milpitas
id: MLPT
grouped_stops:
- operator: CT
group_name: San Jose Diridon Caltrain Station
ids:
- 70261
- 70262
cache_update_interval_minutes: 10
-
Create virutal env
python -m venv sce-venv
-
Activate virtual env
- Window:
.\sce-venv\modules\Scripts\activate.bat
- MacOS/Linux
source sce-venv/bin/activate
-
Run script in the project's root directory
-
Command line:
python ./server/app.py --host=0.0.0.0 --port=8001 --config=./server/data.yaml
-
Docker:
docker-compose up --build
- Access transit predictions at http://localhost:8001/predictions
Make sure you have Docker installed on your device
-
Follow steps 1 + 2 for running the "Backend Only"
-
In the project's root directory, paste the following script in the terminal:
docker-compose -f docker-compose.dev.yml up
- Now, you can access SCEta's frontend and backend data from
localhost:3001
- To view the frontend, go to
localhost:3001
- To view transit predictions from the server, go to
localhost:3001/api/predictions
- To view metrics, go to
localhost:3001/prometheus/graph