Skip to content

dme6/Rhubarb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

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

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors