How to run Python (Flask) Server in Background? [duplicate]

Solution
pythonw -m flask run > log.txt 2>&1