JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q57607F
  • License MIT

A Bonjour / Zeroconf implementation in JavaScript

Package Exports

  • spread-the-word

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (spread-the-word) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

spread-the-word

A Bonjour / Zeroconf implementation in JavaScript.

Github Version NPM Version NPM Downloads License

Spread services across your local network and discover other services

Installation

$ npm i spread-the-word

or

$ yarn add spread-the-word

Usage

import stw from "spread-the-word";

stw
  .on("up", (remoteService, res, referrer) => {
    console.log(`${remoteService.name} is up! (from ${referrer.address})`);
  })
  .on("down", (remoteService, res, referrer) => {
    console.log(`${remoteService.name} is down! (from ${referrer.address})`);
  });

stw.listen({ type: "jsremote" });

stw.spread({
  type: "jsremote",
  name: "awesome remote receiver",
  port: 4444,
  txt: {
    message: "Custom Data"
  }
});

Features

  • easy service detection & advertisement on your local network
  • TXT record support
  • subtypes support
  • auto probing on spread
  • no extra native dependencies
  • typescript types included

Documentation

You can find the latest version of documentation hosted here.

Debug

$ DEBUG=SpreadTheWord:* yarn start

License

MIT