From bc0936e828e13596b176286a58d277e57f71b74f Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 9 Apr 2026 19:00:46 -0300 Subject: [PATCH] =?UTF-8?q?Adicionado=20a=20configura=C3=A7=C3=A3o=20ao=20?= =?UTF-8?q?projeto=20para=20ser=20configurado=20din=C3=A2micamente=20se=20?= =?UTF-8?q?o=20ambiente=20=C3=A9=20de=20desenvolvimento,=20a=20porta=20e?= =?UTF-8?q?=20o=20host=20do=20aplicativo!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/database.cpython-313.pyc | Bin 0 -> 245 bytes app.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 __pycache__/database.cpython-313.pyc diff --git a/__pycache__/database.cpython-313.pyc b/__pycache__/database.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15d2311d91df203e77ccd49567dd5497a74b7574 GIT binary patch literal 245 zcmey&%ge<81S%JPO4oIC(u+zATH(y5+9fu85!>~s6S-oZ;okXDq;tU F0RWjRJ}dwL literal 0 HcmV?d00001 diff --git a/app.py b/app.py index 5f729f9..77a1b6f 100644 --- a/app.py +++ b/app.py @@ -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)