GithubHelp home page GithubHelp logo

jrsglobalpriv / electron-node-red Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dceejay/electron-node-red

0.0 1.0 0.0 539 KB

Electron Node-RED template

License: Creative Commons Zero v1.0 Universal

Shell 0.37% HTML 11.73% JavaScript 87.90%

electron-node-red's Introduction

electron-node-red

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

This is not intended to be a useful tool as-is, but as a base for you to create your own versions. You will need to edit the main.js to suit your application and update the package.json file to include your own required dependencies.

At the top of main.js are a couple of flags you can switch to turn off editing, allow loading of a different flow file (and save as), and adding the worldmap to the menu. Again these are only there to show you possibilities. Have fun.

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 - building runtimes

On OSX you can run ./buildall to build binaries of "everything"... maybe...

Run npm run pack to create packages for all platforms - these are the files required to run, they are not binary installers.

Builds are created in the build directory. Runtimes are created in the ../electron-bin directory.

Note: this was written to work on a Mac... other tools may/will be needed on other platforms.

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:linux64 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.16.2 -m [email protected] -a i386 Node-RED-linux-ia32/
fpm -s dir -t deb -f -n node-red-electron -v 0.16.2 -m [email protected] -a x86_64 Node-RED-linux-x64/

Use sudo dpkg -i ...* to install the correct deb for your architecture.

Use Node-RED command to run. Flows are stored in ~/.node-red.

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.

See also

electron-node-red's People

Contributors

natcl avatar dceejay avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.