changes of db config add .env file and rename of ex_formate.html to file_formate.html

This commit is contained in:
2026-01-10 13:05:13 +05:30
parent 54f3d16b57
commit 5afe8e7096
7 changed files with 126 additions and 19 deletions

18
run.py
View File

@@ -1,9 +1,17 @@
from app import create_app, db
from dotenv import load_dotenv
load_dotenv()
from app import create_app
from app.services.db_service import db
import os
app = create_app()
with app.app_context():
db.create_all()
if __name__ == "__main__":
app.run(host='0.0.0.0' ,debug=True, port=5001)
with app.app_context():
db.create_all()
app.run(
host=os.getenv("FLASK_HOST"),
port=int(os.getenv("FLASK_PORT")),
debug=os.getenv("FLASK_DEBUG") == "True"
)