Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spacebro

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spacebro

Spacebro use Zeroconf and socket.io to binds apps together

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Spacebro

In reference to Spacebrew by Rockwell Lab (http://www.rockwellgroup.com/search/LAB)

js-standard-style node node node node

Spacebro automagically links apps between them. It binds them based on events. It is here to help you connect your apps together. You define a list of events, and make sure your client apps emits and listen to them.

It follow a centralized model where each apps automagically connects thru zeroconf and socket.io to the Spacebro server. Then each of them register a supplementary list of events.

Prerequisites

Space bro use:

  • mdns to allow your app to connect seamlessly
  • socket.io to broadcast events
  • cli-table to display a list of connected clients
  • lodash to easily handle array manipulation

Linux

$ sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev curl build-essential

Install Spacebro

$ npm i --save spacebro

You can install globally by using :

$ npm i -g --save spacebro

Configure

Spacebro is awaiting a config file that looks like :

{
  "server": {
    "port": 8888,
    "serviceName": "spacebro"
  },
  "events": ["event-1", "event-2", "event-3"]
}

The port define where Spacebro (socket.io) will listen. The serviceName is the name that Spacebro will use over Zeroconf. The events array allows you to define a list of events that you want to register.

Usage

const config = require('../config.json')
var spacebro = require('spacebro')
spacebro.init(config)

You can use the bin :

spacebro --port 8888

or spacebro --port 8888 --servicename woowoo

By default the service name is spacebro

This is useful if you want to use the spacebro-client

Develop

You can test sending events with the dev/send-events.js script. Run $ npm run send-events.

Please follow standard style conventions.

Keywords

FAQs

Package last updated on 04 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc