-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwsgi.py
More file actions
35 lines (25 loc) · 755 Bytes
/
wsgi.py
File metadata and controls
35 lines (25 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-FileCopyrightText: 2025 GRIMdata / LittleRainbowRights
# SPDX-License-Identifier: MIT
"""
WSGI entry point for production deployment
Use with gunicorn:
gunicorn -w 4 -b 0.0.0.0:5000 wsgi:app
Or with other WSGI servers.
"""
import os
import sys
# Add project root to path for imports
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from api.app import create_app # noqa: E402
# Load environment variables from .env file
try:
from dotenv import load_dotenv
load_dotenv()
except ImportError:
pass
# Create application instance
app = create_app(os.getenv("FLASK_ENV", "production"))
if __name__ == "__main__":
# This won't be used in production, but allows testing with:
# python wsgi.py
app.run()