This is an Electron template to embed Node-RED with an existing Node-RED project to create a native application.
 
 
Go to file
Dave Conway-Jones 25624c8e91 Better loading icon and demo flow 2016-10-30 23:03:12 +00:00
.gitignore general tidy up - update 2016-10-29 14:43:32 +01:00
.travis.yml Slight tidy 2016-10-29 22:57:05 +01:00
LICENSE.md First commit 2016-03-09 16:49:41 -05:00
README.md Update/fix windows install builder 2016-10-30 22:06:48 +00:00
appbkg.png Add more packaging goodness 2016-05-06 13:18:15 +01:00
appdmg.json general tidy up - update 2016-10-29 14:43:32 +01:00
flows.json Better loading icon and demo flow 2016-10-30 23:03:12 +00:00
flows_cred.json Update versions again... add default flow 2016-10-28 14:03:43 +01:00
loading.gif Better loading icon and demo flow 2016-10-30 23:03:12 +00:00
main.js Update/fix windows install builder 2016-10-30 22:06:48 +00:00
makewin32.js Better loading icon and demo flow 2016-10-30 23:03:12 +00:00
makewin64.js Better loading icon and demo flow 2016-10-30 23:03:12 +00:00
nodered.icns Several enhancements thanks to dceejay ! 2016-04-20 14:50:30 -04:00
nodered.ico let's try again 2016-05-06 17:07:03 +01:00
nodered.png let's try again 2016-05-06 17:07:03 +01:00
package.json Better loading icon and demo flow 2016-10-30 23:03:12 +00:00

README.md

electron-node-red

This is an Electron template to embed Node-RED with a Dashboard generated by node-red-dashboard.

You can base off this model and update the package.json file to include your own required dependencies.

To Use

To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
git clone https://github.com/dceejay/electron-node-red.git
# Go into the repository
cd electron-node-red
# Install dependencies and run the app
npm install && npm run clean && npm start

TL:DR

Run npm run pack to create packages for all platforms or npm run build to build a .dmg file for OSX, and deb files for linux (32 and 64bit). or npm run build:osx to just build for OSX.

Builds are created in the build directory. Runtimes are created in the dist directory.

Packaging your application

If you want to distribute executables of this project, the easiest way is to use electron-packager:

sudo npm install -g electron-packager

# build for OSX 64 bits
electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build --overwrite

# build for Windows 64 bits
electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64  --out=build --asar=true --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'

# build for Linux 64 bits
electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite

Learn more about Electron and its API in the documentation.

To package as a dmg

npm run build:osx

look at https://github.com/LinusU/node-appdmg

sudo npm install -g appdmg

appdmg appdmg.json ~/Desktop/NodeRED.dmg

To package as a deb

npm run build:linux or npm run build:linux32 - for Intel Linux

look at https://github.com/jordansissel/fpm

fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m your-email@example.com -a i386 Node-RED-linux-ia32/
fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m your-email@example.com -a x86_64 Node-RED-linux-x64/

To package as an exe

npm run build:win32 - to build for 32-bit Windows.

npm run build:win64 - to build for 64-bit Windows.

Note: This project was built to run on Mac OSX - To build for windows on other platforms you may need to use other tools.

License CC0 (Public Domain)

See also