|
|
@@ -1,11 +1,13 @@
|
|
|
"""Application entrypoint."""
|
|
|
+import os
|
|
|
+
|
|
|
from werkzeug.exceptions import HTTPException
|
|
|
|
|
|
from app.app import create_app
|
|
|
from app.exceptions.api_exception import APIException
|
|
|
from app.exceptions.common_error import ServerError
|
|
|
|
|
|
-app = create_app("development")
|
|
|
+app = create_app(os.getenv("FLASK_ENV", "development"))
|
|
|
|
|
|
|
|
|
@app.errorhandler(Exception)
|
|
|
@@ -31,4 +33,4 @@ def framework_error(e):
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- app.run(host="0.0.0.0", port=5000, debug=True)
|
|
|
+ app.run(host="0.0.0.0", port=5000, debug=app.config.get("DEBUG", False), use_reloader=False)
|