From e30a0a6f9b22de59999dfd9c3d1d7d6246fdbb2b Mon Sep 17 00:00:00 2001 From: furu04 Date: Tue, 10 Jun 2025 13:08:08 +0900 Subject: [PATCH] =?UTF-8?q?run.py=20=5F=5Finit=5F=5F.py=E3=81=AE=E5=BD=A2?= =?UTF-8?q?=E3=82=92=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88=E3=81=9A=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__init__.py | 9 +++++++++ run.py | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index e69de29..41435a3 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -0,0 +1,9 @@ +from flask import Flask +from flask_sqlalchemy import SQLAlchemy +from flask_login import LoginManager + + +# TODO:DB設定などのコードを書く +def create_app(): + app = Flask(__name__) + return app \ No newline at end of file diff --git a/run.py b/run.py index e69de29..523d51a 100644 --- a/run.py +++ b/run.py @@ -0,0 +1,6 @@ +from app import create_app + +app = create_app() + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file