1.1.0 • Published 3 years ago

@dme6/rhubarb v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Rhubarb

GitHub

A framework for creating desktop programs with web technologies by simplifying server and client communication.

Requirements

  • A chromium-based web browser.
  • Node.js with npm.

Installation

npm install @dme6/rhubarb

Examples

Server-side:

const { Server, BrowserInstance } = require("@dme6/rhubarb/dist/server/Rhubarb");

const server = new Server({});

server.on("ready", () => {

    const inst = new BrowserInstance({
        htmlPath: "path/to/page.html",
        chromePath: "path/to/browser.exe",
        server
    });

    inst.start();

});

server.on("wsConnection", msgr => {
    msgr.send("msg1", "Hello.");
    msgr.on("msg2", data => {
        console.log(data);
    });
});

server.start();

Client-side:

import { Client } from "./node_modules/@dme6/rhubarb/dist/client/Rhubarb.js";

const client = new Client();

client.on("wsConnection", msgr => {

    msgr.on("msg1", data => {
        console.log(data);
        msgr.send("msg2");
    });
    
});

client.start();
1.1.0

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago