0.9.3 • Published 3 years ago

spread-the-word v0.9.3

Weekly downloads
128
License
MIT
Repository
github
Last release
3 years ago

spread-the-word

A Bonjour / Zeroconf implementation in TypeScript.

Github Version NPM Version NPM Downloads License CircleCI

Spread services across your local network and discover other services

Installation

$ npm i spread-the-word

Usage

import stw from "spread-the-word";

stw.on("up", (remoteService, response, referrer) => {
  console.log(`${remoteService.name} (type: ${remoteService.type}, port: ${remoteService.port}) is up (from ${referrer.address})`);
  if (remoteService.txt) {
    console.log("TXT found:", remoteService.txt);
  }
}).on("down", (remoteService, response, referrer) => {
  console.log(`${remoteService.name} (type: ${remoteService.type}, port: ${remoteService.port}) 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:* npm start

License

MIT

0.9.3

3 years ago

0.9.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.2

5 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago