서버 배포 설정: wsgi.py, gunicorn, start.sh
This commit is contained in:
4
app.py
4
app.py
@@ -960,6 +960,8 @@ def index():
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--host', default='127.0.0.1', help='Host to bind to')
|
||||
parser.add_argument('--port', type=int, default=5000, help='Port to run the server on')
|
||||
parser.add_argument('--debug', action='store_true', help='Enable debug mode')
|
||||
args = parser.parse_args()
|
||||
app.run(debug=True, port=args.port)
|
||||
app.run(host=args.host, debug=args.debug, port=args.port)
|
||||
|
||||
Reference in New Issue
Block a user