Add meal tracker app: Flask + SQLite with auth, dashboard, 31 passing tests, Docker Compose
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"""Meal Tracker — Flask application entry point."""
|
||||
|
||||
import os
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from models import init_db
|
||||
from auth import auth_bp
|
||||
from meals import meals_bp
|
||||
|
||||
|
||||
def create_app() -> Flask:
|
||||
app = Flask(__name__)
|
||||
app.secret_key = os.environ.get("SECRET_KEY", "dev-secret-change-me")
|
||||
|
||||
app.register_blueprint(auth_bp)
|
||||
app.register_blueprint(meals_bp)
|
||||
|
||||
with app.app_context():
|
||||
init_db()
|
||||
|
||||
return app
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = create_app()
|
||||
app.run(host="0.0.0.0", port=5000, debug=True)
|
||||
Reference in New Issue
Block a user