Turning the previous cmd app into a Flask app