Explorar el Código

Update qywx app: add host and port

StrayWarrior hace 5 meses
padre
commit
1d61caacf1
Se han modificado 1 ficheros con 3 adiciones y 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)