title: How to make python script server side
body: <p>I'm trying to make my raspberry PI host a website for control of a system on my house but can't run server side Python</p>
  
  <p>I've tried this in Javascript:</p>
  
  <pre><code>import { exec } from 'child_process';
  exec("sudo python /home/pi/Light.py");
  </code></pre>
  
  <p>It's supposed to run Light.py server side because it contains GPIO instructions for the pi but the PI just sits there doing nothing</p>