title: How to run Flask Server in the background
body: <p>I have set up Flask on my Rapsberry Pi and I am using it for the sole purpose of acting as a server for an xml file which I created with a Python script to pass data to an iPad app (iRule).</p>
  
  <p>My RPI is set up as headless and my access is with Windows 10 using PuTTY, WinSCP and TightVNC Viewer.</p>
  
  <p>I run the server by opening a terminal window and the following command:</p>
  
  <pre><code>sudo python app1c.py 
  </code></pre>
  
  <p>This sets up the server and I can access my xml file quite well. However, when I turn off the Windows machine and the PuTTY session, the Flask server shuts down!</p>
  
  <p>How can I set it up so that the Flask server continues even when the Windows machine is turned off?</p>
  
  <p>I read in the Flask documentation:</p>
  
  <blockquote>
    <p>While lightweight and easy to use, Flask’s built-in server is not suitable for production as it doesn’t scale well and by default serves only one request at a time. </p>
  </blockquote>
  
  <p>Then they go on to give examples of how to deploy your Flask application to a WSGI server! Is this necessary given the simple application I am dealing with?</p>