feat: added vue router
This commit is contained in:
15
app.py
15
app.py
@@ -52,20 +52,13 @@ class CameraListener:
|
||||
sio.sleep(0.05)
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
@app.route('/', defaults={'path': ''})
|
||||
@app.route('/<string:path>')
|
||||
@app.route('/<path:path>') # does not seem to work
|
||||
def index(path):
|
||||
return send_file('client/dist/index.html')
|
||||
|
||||
|
||||
@app.route('/imagestream.mjpg')
|
||||
def image_stream():
|
||||
# ps = redisdb.pubsub()
|
||||
# cam = Camera()
|
||||
# return Response(cam.mjpeg_stream(boundary.encode()),
|
||||
# mimetype='multipart/x-mixed-replace; boundary=lkajflkasdjlkfaj')
|
||||
return ""
|
||||
|
||||
|
||||
@sio.on("camera")
|
||||
def camera_message(directions):
|
||||
# walle.set_eye_velocity(directions['angle'], directions['force'])
|
||||
|
||||
Reference in New Issue
Block a user