Adicionado a configuração ao projeto para ser configurado dinâmicamente se o ambiente é de desenvolvimento, a porta e o host do aplicativo!

This commit is contained in:
2026-04-09 19:00:46 -03:00
parent 4e21f32e6f
commit bc0936e828
2 changed files with 5 additions and 1 deletions
Binary file not shown.
+5 -1
View File
@@ -1,3 +1,4 @@
import os
from flask import Flask
from database import db
from controller.usuario_controller import usuario_bp
@@ -14,4 +15,7 @@ with app.app_context():
db.create_all()
if __name__ == '__main__':
app.run(debug=True)
host = str(os.environ.get("HOST", "localhost"))
port = int(os.environ.get("PORT", 5000))
debug = str(os.environ.get("DEBUG", "true"))
app.run(debug=debug, port=port, host=host)