소스 검색

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)