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
I've tried this in Javascript:
import { exec } from 'child_process';
exec("sudo python /home/pi/Light.py");
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