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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nupnp

v1.0.0

Published

Discovery broker for IoT devices

Readme

🤖 nupnp NPM Version node Dependency Status JavaScript Style Guide

Node.js Discovery broker for IoT devices. 🤖

screen

Install

npm install nupnp or npm install -g nupnp

Programmatic usage

Server

const {Server} = require('nupnp')

let server = new Server({
  port: 8180,
  verbose: true,
  enableProxy: true,
  connectionString: 'sqlite://database.sqlite' // @keyv compatible storage conn. string
}).listen()
  .then(() => console.log(`Server listening on port 8180 - Trust proxy: true`)).catch(console.error)

From CLI:

PORT=8180 VERBOSE=true ENABLE_PROXY=true nupnp &

If globally installed, it will use by default in-memory storage. Otherwise pick and install the keyv adapter you like the most (We're using keyv as storage layer).

Client

const {Client} = require('nupnp')
const os = require('os')

let client = new Client({
  host: 'http://localhost:8180'
})

let iface = os.networkInterfaces().wlp2s0 || os.networkInterfaces().eth0

// register a device
client.register({
  name: 'MyDevice',
  address: iface[0].address, // lan ip
  port: 1234, // optional
  ttl: null // optional
}).then(console.log).catch(console.error)

// get devices
client.getDevices().then(console.log).catch(console.error)

Server API

Register device with:

curl -H "Content-Type: application/json" -X POST -d '{"name":"Testdevice","address":"192.168.100.151"}' http://localhost:8180/api/register

Optional parameters:

  • port
  • ttl (in milliseconds)

List device with:

http://localhost:8180/api/devices

Inspiration

After about 1 minute open a web browser and point to find.z-wave.me. Below the login screen you will see the IP address of your RaZberry system. Click on the IP address link to open the configuration dialog.

  • http://www.meethue.com/api/nupnp
  • http://find.z-wave.me
  • http://setup.thinka.eu
  • https://github.com/yene/nupnp

Options

  • [x] Trust reverse Proxy
  • [x] Support to IPv4 & IPv6

Security

Never allow another IP address to access the data. Remove the entries after 24h. If you use a proxy prevent external access to the API server.

Caddy Proxy configuration

proxy /api/register localhost:8180 {
        proxy_header X-Forwarded-Proto {scheme}
        proxy_header X-Forwarded-For {host}
        proxy_header X-Real-IP {remote}
        proxy_header Host {host}
}

License

MIT

Author

Rocco Musolino (@roccomuso)