ryansurf / cli-surf

Get surf and ocean data from the command line interface
MIT License
18 stars 31 forks source link

Enable hot reload for development server #36

Closed K-dash closed 6 months ago

K-dash commented 6 months 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 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

K-dash commented 6 months 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 6 months ago

Woah, that is useful. Nice!