Closed K-dash closed 6 months ago
Genius. I kept running the server, seeing an error, stopping the server, changing a file and then starting the server again to see if the bug was fixed. That was getting... tedious 😂
Good call, merging
@ryansurf Thanks! Another benefit of setting the debug mode to True is that when an error occurs, Flask will display the error's stack trace on the screen 🥴
Woah, that is useful. Nice!
It was inconvenient because file updates were not automatically reflected when Flask was running. Therefore, we enabled hot reloading of Flask.
server.py
to pass the debug parameter toapp.run()
based on theDEBUG
environment variable.DEBUG
field to the ServerSettings class insettings.py
with a default value of True.By setting
debug=True
, The server automatically restarts whenever a file is modified.