서버 배포 설정: wsgi.py, gunicorn, start.sh

This commit is contained in:
user01
2026-05-25 02:26:42 +09:00
parent ef9997939e
commit c434e64fb8
4 changed files with 13 additions and 1 deletions

4
app.py
View File

@@ -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)