add requirements and readme instructions
This commit is contained in:
parent
a1d438f04d
commit
c66b256b54
4 changed files with 41 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
__pycache__/
|
||||
venv/
|
||||
|
|
35
README.md
Normal file
35
README.md
Normal file
|
@ -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.
|
|
@ -30,8 +30,8 @@ def start_run(run_index):
|
|||
return f'Run {run_index} started at {starttime}'
|
||||
|
||||
|
||||
@app.route("/checkpoint/start/<run>/<index>")
|
||||
def checkpoint_start(run, index):
|
||||
@app.route("/link/start/<run>/<index>")
|
||||
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/<run>/<index>")
|
||||
def checkpoint_handoff(run, index):
|
||||
@app.route("/link/handoff/<run>/<index>")
|
||||
def link_handoff(run, index):
|
||||
if db["current_run"] != run:
|
||||
return "Wrong run number, you are probably behind.", 404
|
||||
else:
|
||||
|
|
1
watcher/requirements.txt
Normal file
1
watcher/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
flask
|
Loading…
Reference in a new issue