npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

easy-mdns

v1.0.3

Published

A simple mDNS config based server that watches for config changes.

Readme

Easy mDNS

I've been wanting an easy way to setup mDNS servers for all the raspberry pis and virutal machines in my house to help me better know what's where without needing to also create dns entries.

Configuration

By default this will look for a config named .mdns-bonjour-autobroadcast-config.yml in the user's home directory. If you can't find the file after you've ran this once ensure you have toggled the hidden file view.

This package uses bonjour under the hood and passes the options from the yml direclty to bonjour, so to link to their docs...

Options are:

  • name (string)
  • host (string, optional) - defaults to local hostname
  • port (number)
  • type (string)
  • subtypes (array of strings, optional)
  • protocol (string, optional) - udp or tcp (default)
  • txt (object, optional) - a key/value object to broadcast as the TXT record

IANA maintains a list of official service types and port numbers.

interface ServiceOptions {
    name: string;
    host?: string | undefined;
    port: number;
    type: string;
    subtypes?: string[] | undefined;
    protocol?: 'udp'|'tcp' | undefined;
    txt?: { [key: string]: string } | undefined;
    probe?: boolean | undefined;
}

Example in YAML:

- name: using-every-option
  host: 192.168.1.102
  type: https
  port: 8006
  subtypes:
    http
    proxmox
  protocol: tcp
  txt: 
    name: "Proxmox Cluster 1"
    link: "https://192.168.1.101:8006"
    updates_available: true
  probe: false

- name: using-every-option
  host: 192.168.1.102
  type: ssh
  port: 22
  protocol: tcp

- name: terbium
  host: 192.168.1.101
  type: ssh
  port: 22
  protocol: tcp

- name: terbium
  host: 192.168.1.101
  type: udp
  port: 42001
  txt:
    serial: /dev/tty0
    status: online
    temp: 87
    humidity: 61

If you pass a config=/absolute/file/path with the easy-mdns command it'll load the config from that file instead of the home directory.

easy-mdns --config=/etc/mdns/config.yml

Lastly, this will include a file watcher so any changes made to the file will cause easy-mdns to unpublish the services and republish based on the changed made to the config. This means you can have other programs manipulate the config file and the changes will be automatically published through mdns.


Helpful file stubs

supervisord

[program:easy-mdns]
user=root
command=/usr/bin/node /usr/bin/easy-mdns
stderr_logfile = /var/log/easy-mdns/stderr.log
stdout_logfile = /var/log/easy-mdns/stdout.log

Using forever

npm install -g forever
forever start /usr/bin/easy-mdns