jupiter-faq-bot / app /__init__.py
thecoderhere's picture
Update app/__init__.py
b8d8ce9 verified
raw
history blame contribute delete
577 Bytes
# 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