All Projects → trusktr → electron-web-worker-example

trusktr / electron-web-worker-example

Licence: other
A bare minimal example of a Web Worker running in Electron with Node integration enabled.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Electron Web Worker Example

Bare minimal example that shows a Web Worker running in Electron with Node integration, meaning the Worker can use Node.js APIs (f.e. require() to import NPM dependencies, etc).

Run

To run the example:

npm install
npm start

When the window opens, look at the console to see the logs from the worker script.

The src/client.js file starts the src/worker.js file in a Worker. The src/index.js file creates the BrowserWindow with nodeIntegrationInWorker set to true so that Node.js APIs are available in the Worker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].