bare-sidecar
Reference for bare-sidecar: start and manage a Bare sidecar process from a Node.js or Electron host.
bare-sidecar starts and manages a Bare sidecar process from a Node.js or Electron host—a way to run a Bare core alongside a Node/Electron app and talk to it over its standard streams. It's pure JavaScript.
npm i bare-sidecarUsage
const Sidecar = require('bare-sidecar')
const sidecar = new Sidecar(require.resolve('./entry'))
sidecar
.on('data', (data) => { /* output from the sidecar */ })
.on('exit', (code, status) => { /* the sidecar exited */ })API
const sidecar = new Sidecar(entry[, args][, options])
Spawn a Bare process running entry, with optional args and options.
sidecar.stdin · sidecar.stdout · sidecar.stderr
The sidecar's standard streams.
Emits data (sidecar output), exit ((code, status)), and close.
Related modules
Builds on bare-subprocess, bare-pipe, bare-module, bare-fs, bare-os, bare-path, bare-stream, and bare-url (see Bare modules).
See also
bare-subprocess—the lower-level process API.- One core, many platforms—running a Bare core beside a host.
- Bare modules—the full
bare-*catalog.