ryansurf / cli-surf

Get surf and ocean data from the command line interface
7 stars 10 forks source link

Enable hot reload for development server #36

Closed K-dash closed 1 month ago

K-dash commented 1 month ago

It was inconvenient because file updates were not automatically reflected when Flask was running. Therefore, we enabled hot reloading of Flask.

By setting debug=True, The server automatically restarts whenever a file is modified.

ryansurf commented 1 month 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

K-dash commented 1 month ago

@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 🥴

image
ryansurf commented 1 month ago

Woah, that is useful. Nice!