An open API service indexing awesome lists of open source software.

https://github.com/paulr113/easyipc

Easy Inter Process Communication Wrapper for Electron
https://github.com/paulr113/easyipc

electron electron-app ipc ipcmain ipcrenderer

Last synced: about 2 months ago
JSON representation

Easy Inter Process Communication Wrapper for Electron

Awesome Lists containing this project

README

          

# EasyIPC
Easy Inter Process Communication Wrapper for Electron

Install:
```shell
$ npm i @paulr113/easyipc
```

Main process:
```js
const EasyIPC = require("@paulr113/easyipc");
const ipc = new EasyIPC(require("electron"));

//Add action
ipc.addAction("test", (payload, res) => {
console.log("New request: test");
console.log(payload)
res.send();
})
```

Render process:
```js
const EasyIPC = require("@paulr113/easyipc");
const ipc = new EasyIPC(require("electron"));

//Send request
ipc.send({action: "test"}).then((payload) => {
console.log("Response from main process");
console.log(payload)
})
```