فهرست منبع

Update qywx app: add host and port

StrayWarrior 5 ماه پیش
والد
کامیت
1d61caacf1
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      web/qywx/app.py

+ 3 - 1
web/qywx/app.py

@@ -64,6 +64,8 @@ def index():
 if __name__ == '__main__':
     parser = ArgumentParser()
     parser.add_argument('--prod', action='store_true')
+    parser.add_argument('--host', default='127.0.0.1')
+    parser.add_argument('--port', type=int, default=8083)
     args = parser.parse_args()
 
-    app.run(debug=not args.prod, port=8083)
+    app.run(debug=not args.prod, host=args.host, port=args.port)