Browse Source

Update qywx app

StrayWarrior 5 months ago
parent
commit
83d61cb4fa
1 changed files with 6 additions and 1 deletions
  1. 6 1
      web/qywx/app.py

+ 6 - 1
web/qywx/app.py

@@ -7,6 +7,7 @@
 from flask import Flask, request, render_template
 from flaskext.mysql import MySQL
 from datetime import datetime, timedelta
+from argparse import ArgumentParser
 
 app = Flask(__name__)
 
@@ -61,4 +62,8 @@ def index():
     return render_template('index.html', results=[], form={'staff_id': '', 'video_id': ''})
 
 if __name__ == '__main__':
-    app.run(debug=True)
+    parser = ArgumentParser()
+    parser.add_argument('--prod', action='store_true')
+    args = parser.parse_args()
+
+    app.run(debug=not args.prod, port=8083)