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

sillyserver

v1.2.10

Published

A simple packet-broadcaster server with rooms and some extra features

Readme

SillyServer.js

SillyServer its a client/server library that provides a easy-to-use server in nodejs that opens a websocket and bounces any packet that receives in that socket to the rest of the users connected.

When connecting to the websocket clients can specify a room name, in that case only the traffic in that room will be bounced to the other users in that room.

It also provides some basic HTTP methods to store and retrieve basic information (information is stored in memory and will be lost when the server is shutdown).

For the client part it comes with a javascript library that provides all the methods to interact with the server.

It has been used in simple web-applications where you want to connect online users between them.

Installation

Server

To install the server app in your own public server machine follow the next steps.

It requires to have installed nodejs.

For Linux and Mac

npm install sillyserver
cp node_modules/sillyserver/src/server/*.js .

For Windows

npm install sillyserver
copy node_modules\sillyserver\src\server\*.js .

Client

You need to include the sillyclient.js in your HTML:

<script src="sillyclient.js"></script>

Usage

Launch the server using the command:

node main.js -port 55000

On the client side include the library sillyclient.js and connect using:

var server = new SillyClient();
server.connect( location.host + ":55000", "CHAT");

//this method is called when the server accepts the connection (no ID yet nor info about the room)
server.on_connect = function(){
  //connected
};

//this method is called when the server gives the user his ID (ready to start transmiting)
server.on_ready = function(id){
  //user has an ID
};

//this method is called when we receive the info about the current state of the room (clients connected)
server.on_room_info = function(info){
  //to know which users are inside
};

//this methods receives messages from other users (author_id is an unique identifier per user)
server.on_message = function( author_id, msg ){
  //data received
}

//this methods is called when a new user is connected
server.on_user_connected = function( user_id ){
	//new user!
}

//this methods is called when a user leaves the room
server.on_user_disconnected = function( user_id ){
	//user is gone
}

//this methods is called when the server gets closed (it shutdowns)
server.on_close = function(){
  //server closed
};

//this method is called when coulndt connect to the server
server.on_error = function(err){
};

To send information to all the other users connected to the same room:

server.sendMessage("mymessage");

Or to send information only to some users, you pass the users id in an array

server.sendMessage("mymessage", [1,4,7]);

You can store information in the server so future users could retrieve it even if you are offline:

server.storeData("mykey", "mydata");
//...
server.loadData("mykey", function(data) { console.log(data); }); //should print mydata

but remember that this information will be lost if the server get shut down.

You can also retrieve information about the current rooms open in the server:

server.getReport( function(report) { ... } );

Rooms that have a name that start with an underscore "_" will be ignored in the report.

Or info about one specific room:

server.getRoomInfo( "myroom", function(room_info) { ... } );