I created a default basic web server with Flask from Visual Studio templates. When I launch it from the command prompt it says "Press Ctrl+C to quit". When I do press Ctrl+C, nothing happens and the server keeps running.
Question: Is there a way to make Flask stop on Ctrl+C as advertised?
This is the code of server startup:
from os import environ
from myapp import app
if __name__ == '__main__':
HOST = environ.get('SERVER_HOST', 'localhost')
try:
PORT = int(environ.get('SERVER_PORT', '5555'))
except ValueError:
PORT = 5555
app.run(HOST, PORT)