Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    bellitepublic

    Bellite Logo bellite-node

    Node.js bindings for the Bellite.io desktop application toolkit using JSON-RPC2-based message passing API. This module wraps the IPC interface, providing complete access to the Command API and Events for creating rich desktop applications.

    After creating a Bellite object, the module will use the BELLITE_SERVER credentials to connect with the host Bellite process and authorize the two-way JSON-RPC2 connection.

    Usage

    "use strict";
    var bellite=require('../bellite.js'),
        app = bellite.Bellite();
     
    app.ready.done(function() {
        app.bindEvent(-1, 'navigate');
        app.on('navigate', function(eobj) {
          console.log('on navigate:', eobj);
        });
     
        app.perform(-1, 'navigateNew', {'url':'https://github.com/bellite/'}).then(function(eobj) {
          console.log('navigateNew:', eobj);
        });
     
        app.perform(-1, 'pathVars').then(function(eobj) {
          console.log('pathVars:', eobj);
        });
    });

    Interface

    The Bellite object extends EventEmitter, and reflects all Bellite events to .emit calls. For each IPC method call, a promise/A+ instance is returned, to be fullfilled or rejected after the Bellite host process responds.

    Interprocess API

    Keywords

    none

    install

    npm i bellite

    Downloadsweekly downloads

    8

    version

    1.4.25

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar