Hello all,
I am curious about the best way to package a Node-RED application for deployment as a standalone executable. The goal is to be able to develop a Node-RED application on a Raspberry Pi and once it is finished, I can create an executable file that can be copied/deployed on another Pi that doesn't have Node-RED installed. After doing some research I have stumbled across three options that are promising:
- Electron-Package-Manager
- Running in a Docker container
- Using the
pkg
tool
Just from the quick research I did on each option it appears the pkg
tool would be the easiest and most suitable for my current situation if I can get it to work. The main disconnect I'm having is that the package.json
file needs a "main entry" point for the application and it appears to be looking for a JavaScript file, usually named index.js
. This doesn't seem to be the case with Node-RED as I haven't been able to find it anywhere in my .node-red
directory or subdirectories.
I'm willing to try other options if there is a better way to accomplish what I'm trying to do. Docker seems to be the most popular choice, but it requires installing Docker on the second Pi (which isn't a deal breaker), but ideally, I wouldn't have to install any other software besides the standalone executable and the default RPI OS installation.
I haven't spent enough time looking into Electron, but it appears to be a more complicated (different) way of accomplishing the same thing as the pkg
tool. I briefly read through the ReadMe on this page GitHub - dceejay/electron-node-red: Electron Node-RED template but perhaps it is exactly what I'm looking for.
Thank you in advance for ideas and help!