forked from OVDR-GRP-Team07/OVDR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
29 lines (21 loc) · 702 Bytes
/
app.py
File metadata and controls
29 lines (21 loc) · 702 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
"""
Main Entry Point for OVDR Backend
Author: Zixin Ding
This script starts the Flask development server. It imports the app factory from the backend package,
initializes the Flask app, and optionally runs cleanup logic upon shutdown.
"""
import atexit
import sys
# Ensure backend package is importable from root directory
sys.path.append("./backend")
# Import the Flask application factory
from backend import create_app
# Create the app instance
app = create_app()
# Register exit hook for graceful shutdow
@atexit.register
def goodbye():
print("Flask is shutting down.")
# Run the app when executing directly
if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0", port=5000)