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

tdp-websocket-demo

v0.1.2-alpha

Published

A simple, self-contained demo of websockets via socket.io to enabled testing of infrastructure (e.g. load balancers)

Readme

#TDP websocket demo

##Overview A tiny, self-contained (no webserver needed) websocket (socket.io) demo which is deployable via npm or git clone. This is intended to make testing infrastructure for websocket functionality a little simpler.

##Requirements NodeJS is required to run (as this is a node app) and either NPM or git to deploy (unless you're simply copying files manually in which case you require only NodeJS).

Deploying

Either:

NPM:

npm install tdp-websocket-demo

git:

git clone https://github.com/neilstuartcraig/websocketDemo.git

##Configuration There is a (tiny) config file in /config of the files deployed. You can amend this if required, the default port (for no particular reason) which the app will listen on is 9001.

##Running You need to invoke the main script which you can do (assuming you're in the root directory of the deployed files - which if you have installed via NPM will be node_modules/tdp-websocket-demo) like this:

node .

You then need to open a browser and visit the IP (or you can add a hosts file entry or even DNS if you really want) and visit http://127.0.0.1:9001 (replacing "127.0.0.1" and "9001" with your specifics).

From there, the simple UI will load and you can see the connection status, current trasport and echo app. The echo app is very simple, the server will just echo back what you type in the text box with a date/time after it.

The UI should look something like this:

That's pretty much it!

I built this to help test load balancer configs at work to ensure they support everything needed for websockets (very necessary if you have OSI layer >3 load balancing).

##Notes/known issues

  • The web layout uses native (no browser prefixes) flexbox so it'll probably have some issues on anything except Chrome.
  • Reconnect isn't working after disconnecting when running locally. I'm having trouble locating the cause of this, no doubt i'm doing somethign stupid - pull requests/suggestions very welcome

##License This application is issued under a Creative Commons attribution share-alike license. This means you can share and adapt the code provided you attribute the original author(s) and you share your resulting source code. If, for some specific reason you need to use this library under a different license then please contact me and i'll see what I can do - though I should mention that I am committed to all my code being open-source so closed licenses will almost certainly not be possible.