diff --git a/.gitignore b/.gitignore index c18dd8d..92afa22 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__/ +venv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..b78ba65 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# Rube Goldberg repo + +## The server + +The server is there to show the progress of a current run and all previous runs. + +### Requirements + +- python +- pip + +### How do you run this? + +Create a venv with the correct packages + + python3 -m venv venv + +Activate the virtual environment + + source venv/bin/activate + +Install the requirements + + pip install -r requirements.txt + +Start the server! + + python app.py + +Go enjoy the dashboard @localhost:5000 + + +## The client + +This is an example client and will also be used as first link in the machine. diff --git a/watcher/app.py b/watcher/app.py index ab8b3b2..adbd84e 100644 --- a/watcher/app.py +++ b/watcher/app.py @@ -30,8 +30,8 @@ def start_run(run_index): return f'Run {run_index} started at {starttime}' -@app.route("/checkpoint/start//") -def checkpoint_start(run, index): +@app.route("/link/start//") +def link_start(run, index): if db["current_run"] != run: return "Wrong run number, you are probably behind.", 404 else: @@ -39,8 +39,8 @@ def checkpoint_start(run, index): return "Success." -@app.route("/checkpoint/handoff//") -def checkpoint_handoff(run, index): +@app.route("/link/handoff//") +def link_handoff(run, index): if db["current_run"] != run: return "Wrong run number, you are probably behind.", 404 else: diff --git a/watcher/requirements.txt b/watcher/requirements.txt new file mode 100644 index 0000000..7e10602 --- /dev/null +++ b/watcher/requirements.txt @@ -0,0 +1 @@ +flask