diff --git a/app.py b/app.py index a409859..488dae9 100644 --- a/app.py +++ b/app.py @@ -1,3 +1,6 @@ -import .app +from app import create_app -app.create_app() +app = create_app() + +if __name__ == "__main__": + app.run(debug=True) diff --git a/app/__init__.py b/app/__init__.py index 90d1155..96b9fc8 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,8 +1,14 @@ from flask import Flask from .controllers.top import top_bp +import os def create_app(): - app = Flask(__name__) + app = Flask( + 'Muspah', + template_folder=os.path.join(os.path.dirname(__file__), 'templates'), + static_folder=os.path.join(os.path.dirname(__file__), 'static'), + instance_relative_config=True + ) app.register_blueprint(top_bp)