Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

bnjmnt4n/node-desktop-quickstart

Repository files navigation

node-desktop-quickstart

A simple Node.js/Chromium desktop quickstart, which can run on both Electron and NW.js. Useful for testing JavaScript libraries.

Files

  • package.json: Installs prebuilt versions of Electron and NW.js, and configures various startup options for the app.
  • index.html: HTML file used for the app.
  • main.js: First script executed in the main process/Node context, which is used to further execute either electron/main.js or nw/node.js.
  • renderer.js: First script executed in the renderer process/browser context, which is used to further execute either electron/renderer.js or nw/browser.js. Common functions can be exposed as globals here for easy access from both Electron and NW.js.
  • electron/main.js: Script which will be executed in Electron's main process, used to open the first Electron window.
  • electron/renderer.js: Script which will be executed in Electron's renderer process.
  • nw/node.js: Script which will be executed in NW.js's Node context, used to open the first NW.js window.
  • nw/browser.js: Script which will be executed in NW.js's browser context.

Usage

You’ll need to have Git and Node.js (which comes with npm) installed on your computer.

# Clone this repository.
$ git clone https://github.com/demoneaux/node-desktop-quickstart

# Go into the repository.
$ cd node-desktop-quickstart

# Install dependencies - prebuilt versions of Electron and NW.js.
$ npm install

# Run the app.
$ npm run electron  # Run on Electron.
$ npm run nw        # Run on NW.js.

Current Versions

Framework Version Node Chromium
Electron 1.7.11 7.9.0 58
NW.js 0.28.0 (SDK) 9.4.0 64

About

A simple Node.js/Chromium desktop app, which can run on both Electron and NW.js. Useful for testing JavaScript libraries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published