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 🙏

© 2024 – Pkg Stats / Ryan Hefner

socialstack-huddle-server

v1.1.11

Published

Socialstack huddle server, built on the wonderful mediasoup.org project

Downloads

29

Readme

SocialStack Huddle Server

This is the Huddle server - it carries video and audio chat. Typically deployed as a cluster.

Dependencies

Huddle server sits directly on top of Mediasoup, so its dependencies directly match Mediasoups. For some guidance, see platform particulars below.

Ubuntu

There's a shell file that you can follow here.

Windows

If you're installing on windows, that's at least the following:

  • Python 2.x
  • npm i -g windows-build-tools
  • Append the path of MSBuild.exe folder to the Windows PATH environment variable (e.g. “C:\Program Files (x86)\MSBuild\14.0\Bin”).
  • Create a new Windows environment variable GYP_MSVS_VERSION with the version of Visual Studio as value (e.g. “2017” for Visual Studio 2017).
  • npm i -g socialstack-huddle-server

Other

See mediasoup for more detail on the required software and dependencies for your target platform.

Installation

After setting up the dependencies, go ahead and install Huddle:

npm install -g socialstack-huddle-server

Starting the server

A just installed Huddle server requires no additional configuration to work locally. Run the following to get it started:

socialstack-huddle-server start

Assuming this is running on localhost, you'll then be able to confirm your server is up and responding by going here:

http://localhost:4443/

Production

In a production deployment, you should use something like NGINX to add https support to the Huddle websocket. A sample NGINX config file is available here.

Configuring a Socialstack site to use a Huddle server

First, go to /pki on your Huddle server. For example if it's running on localhost:

http://localhost:4443/pki

Copy the public key (without the quotes) - you'll need it in a moment. Next, via the admin panel (or straight in the database), go to the "Huddle Servers" section and add a new entry.

  • Address is the hostname of your Huddle server, for example localhost:4443 or myhuddleserver.example.com in production.
  • PublicKey is the value you copied above. Make sure it doesn't include any " when pasting it in.

You may need to restart the Socialstack site API for the change to apply. You'll then be able to create and join Huddles on the site.

Huddle presence

Socialstack sites optionally can be informed about a user's presence when they enter and exit huddles. This works via a webhook - the huddle server makes a web request to the Socialstack API to inform that a user's presence has changed. To make sure that the source huddle server can be trusted to make this request, each Huddle server has a public key which you can obtain by going to e.g. http://localhost:4443/pki (i.e. the location of your Huddle server, plus /pki). Here you'll see a public key which you should copy into your site_huddleserver table. This part is optional but highly recommended.

Huddle server persistent data

Huddle servers have a small SQLite database as well as retain a private key and potentially other persistent data. This is stored in the appdata folder of the given platform, and you can obtain the filepath via the following command:

socialstack-huddle-server configuration

Clearing persistent data

The SQLite database is used to store webhooks that need to be triggered. Sometimes you may need to clear this database out - you can do it either by outright deleting the database.sqlite file in the above persistent data folder, or alternatively run either of the following commands:

  • socialstack-huddle-server database -clear

Clears the whole database.

  • socialstack-huddle-server database -clear -host "mysite.com"

Clears a particular Socialstack site from the database. This is only the case where a Huddle server is being shared by multiple sites.