Skip to content

Easy Inter Process Communication Wrapper for Electron

License

Notifications You must be signed in to change notification settings

paulr113/EasyIPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyIPC

Easy Inter Process Communication Wrapper for Electron

Install:

$ npm i @paulr113/easyipc

Main process:

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:

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)
})

About

Easy Inter Process Communication Wrapper for Electron

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages