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
- Host: GitHub
- URL: https://github.com/paulr113/easyipc
- Owner: paulr113
- License: gpl-3.0
- Created: 2020-10-19T20:54:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-05T03:26:06.000Z (almost 3 years ago)
- Last Synced: 2025-03-21T09:35:26.564Z (over 1 year ago)
- Topics: electron, electron-app, ipc, ipcmain, ipcrenderer
- Language: TypeScript
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
})
```