I have a Python-based app that controls LEDs. It uses Flask
to create a webserver so I can work with a nice UI using HTML, CSS, and JS.
My current process:
python home.py
- navigate to
localhost:5000
in browser - profit!
I'd like to take it a step further and package it up as a nw.js
(formerly node-webkit
) app.
Basically, I believe I simply need to execute my python script before the window loads, so that my tried-and-true flask web server kicks off and creates a localhost:5000
page for my nw.js
app interface to open up.
How can I package my nw.js app so it runs a python script on startup?