changes of db config add .env file and rename of ex_formate.html to file_formate.html
This commit is contained in:
18
run.py
18
run.py
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user