-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
26 lines (21 loc) · 658 Bytes
/
app.py
File metadata and controls
26 lines (21 loc) · 658 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
"""
NuGenBioPython - BioPython Web Application
Main application entry point
"""
# Set matplotlib backend before any other imports to prevent NSWindow threading issues
import matplotlib
matplotlib.use('Agg')
from flask import Flask
from utils.config import configure_app
from routes import register_blueprints
# Create Flask application
app = Flask(__name__)
# Configure application
configure_app(app)
# Register all blueprints
register_blueprints(app)
if __name__ == '__main__':
import os
debug_mode = os.environ.get('FLASK_DEBUG', 'False').lower() == 'true'
port = int(os.environ.get('PORT', 9000))
app.run(debug=debug_mode, port=port)