1.0.1 • Published 5 years ago

rpc-bus v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

rpc-bus

Event bus for Carlo's remote procedure call

install

npm install --save rpc-bus

usage

import { launch } from 'carlo';
import { rpc, rpc_process } from 'carlo/rpc';

const app = await launch(
    {
      bgcolor: '#eee',
      width: 1400,
      height: 840,
      userDataDir,
      title: 'title',
      args: process.env.DEV === 'true' ? ['--auto-open-devtools-for-tabs'] : []
    });

const bus = await rpc_process.spawn('node_modules/rpc-bus/dist/index.js');

await app.mainWindow().load('index.html', rpc.handle(app), bus);