File size: 577 Bytes
09d8253
 
 
 
 
 
 
b8d8ce9
 
 
 
 
09d8253
b8d8ce9
 
 
09d8253
b8d8ce9
 
 
 
09d8253
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# app/__init__.py
from flask import Flask
import logging
import os

def create_app():
    """Create and configure the Flask application"""
    # Set up logging
    logging.basicConfig(
        level=logging.INFO,
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    )
    
    app = Flask(__name__)
    app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'dev-secret-key')
    app.config['DEBUG'] = False
    
    # Register routes
    with app.app_context():
        from app.routes import main
        app.register_blueprint(main)
    
    return app