It can be difficult to end the process for the Flask server via the kill command. Thus it would be useful to add a service/url to shutdown the flask server. There is a good description of the process here:
https://stackoverflow.com/questions/15562446/how-to-stop-flask-application-without-using-ctrl-c