Electron Communicator
An electron router that has a similar interface/usage as an HTTP server, Express, and similar libraries.
Usage
In electron:
import { ipcMain } from 'electron';
import { mainTransponder } from 'electron-transponder';
const transponder = mainTransponder(ipcMain);
transponder.register('GET', 'users', async (req, res) => {
let users = await getUsers();
res.send(users);
});
In front-end:
import { renderTransponder } from 'electron-transponder';
let users = await renderTansponder.request('GET' || requestMethods.GET, 'api/users', {
organization_id: 3
});
Roadmap