From eba8db150ecbff3c433d78c6fa772ae918d51e31 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Thu, 17 Feb 2022 20:43:36 -0800 Subject: [PATCH] update/redirect --- webstreaming.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webstreaming.py b/webstreaming.py index 98a1de7..5abff60 100644 --- a/webstreaming.py +++ b/webstreaming.py @@ -1,7 +1,7 @@ # import the necessary packages from pyimagesearch.motion_detection.singlemotiondetector import SingleMotionDetector from imutils.video import VideoStream -from flask import Response +from flask import Response, redirect from flask import Flask from flask import render_template import threading @@ -28,6 +28,10 @@ time.sleep(2.0) @app.route("/") def index(): + return redirect("/camera") + +@app.route("/camera") +def main(): # return the rendered template return render_template("index.html") @@ -120,7 +124,7 @@ if __name__ == '__main__': t.start() # start the flask app - app.run(host="0.0.0.0", port=8080, debug=False, + app.run(host="0.0.0.0", port=80, debug=False, threaded=True, use_reloader=False) # release the video stream pointer