Explorar o código

Update qywx app: add host and port

StrayWarrior hai 6 meses
pai
achega
1d61caacf1
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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)