Flask Hot Reload
Have you noticed that when you run your flask app using flask run
, everytime you make changes to your code, you have to restart the server?
Well this is the default behaviour of the development server of flask.
How to hot reload
Is there a way for us to experience hot reload in flask?
Definitely!
We just have to add the debug option when we run our development server. If you are using flask run
, just make it
flask run --debug
and notice now that everytime you have changes in your code and you saved it, the server will automatically reflect the changes.
I hope this helps!
If you have any questions just take it down below.