npm.io
0.0.7 • Published 3 years ago

chimera-js-integrator

Licence
GPL-3.0-or-later
Version
0.0.7
Deps
6
Size
73 kB
Vulns
0
Weekly
0

ChimeraJS Integrator

tests npm license

Communication Extension for JS to ChimeraPy's Pythonic Runtime Environment using ZeroMQ

Architecture Diagram

Installation

Use the following command to install the package:

npm install chimera-js-integrator

Usage

First, you need to install the plugin to your Vue application. Use the following to start:

import { ChimeraJSIntegrator } from 'chimera-js-integrator'
import mitt from 'mitt'

// Create the emitter
const emitter = mitt()

// Install plugin (provide the emitter instance from mitt)
// You can also omit the eventArray parameter if you can to
// capture all events and broadcast
const chimerajs = new ChimeraJSIntegrator(emitter, ['event1', 'event1'], 6767)
Option Parameters
Parameter Type Accepted or Example inputs Required Description
emitter mitt.Emitter mitt() True The emitter used to communicate between the JS application and ChimeraPy cluster
eventArray string[] ['event1', 'event2'] or [] False Provide an array of events to listen and distribute. [] implies that all events will be broadcast. BEWARE: avoid broadcasting sensitive data
wsPort number 6767 False The port the integrator will bind to the ChimeraPy Cluster's WS Server (the WSS's port)

Example

TODO

Keywords