65 return static_file("index.html", root="static")
66
67#create control route on /control
68@app.get('/control')69def control():
70 return static_file("control.html", root="static")
71
22 states[pin] = state
23 return "pin "+str(pin)+" changed to "+str(states[pin])
24
25@app.get('/setAll/<state:int>')26def setAll(state):
27 if state not in (1,0):
28 abort(code=404, text= "invalid state "+str(state))
Two blank lines are expected between functions and classes.