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

webrtcdevelopment_signaller

v2.0.2

Published

webrtc socket.io signaller

Downloads

3

Readme

WebRTC socket.io signaller

websocket based signaller for handling webrtc offer answer handshake for a comm SaaS platform

To start signaller socket.io server

Signaller to mange the SDP offer/answer for webrtc app on socket.io. To be used while deploying - webrtcdevelopment https://github.com/altanai/webrtc/

alt webrtc development

![Gitter][GS image] Build Status Dependency Status NPM Status

Get the code

Download the npm module

npm i webrtcdevelopment_signaller

or Clone from the git repo

git clone  [email protected]:altanai/webrtcsignaller.git

Integrate inside nodejs applications

One the source is download import the server lib and start the server

Recommended node version >=v612 Can manage node versions using nvm / node version manager

curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
source ~/.profile

check nvm version

nvm --version
nvm list

To install a specific node version

vm install v6.2.1
Downloading https://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-x64.tar.xz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
manpath: can't set the locale; make sure $LC_* and $LANG are correct
Now using node v6.2.1 (npm v3.9.3)

check updated node verson

node -v
v6.2.1

Starting manually

To start signaller socket.io server

node server --ssl --port=8085

Start server with forever

First download forever

npm install forever -g

start forever with options secure server and port

forever start server.js --ssl --port=8085

start with pm2 process manager

start using the ecosystem config file

~/webrtcsignaller$ pm2 start ecosystem.config.js 
[PM2][WARN] Applications signaller not running, starting...
[PM2] App [signaller] launched (1 instances)
┌─────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name         │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ signaller    │ default     │ 2.0.0   │ cluster │ 30115    │ 0s     │ 0    │ online    │ 0%       │ 14.3mb   │ ubuntu   │ enabled  │
└─────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

see status of running apps

pm2 list
┌─────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name         │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ signaller    │ default     │ 2.0.0   │ cluster │ 30115    │ 3s     │ 0    │ online    │ 0%       │ 31.8mb   │ ubuntu   │ enabled  │
└─────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

to see the process reports

pm2 reprt 

Further more check if ports are listening

lsof -i | grep 8085
> PM2     21865 ubuntu   31u  IPv4 18120035      0t0  TCP *:8085 (LISTEN)

to see list of running processes in forever

forever list

Generate CSR for ssl certs

openssl req -nodes -newkey rsa:2048 -keyout brightchats.key -out brightchat.csr

Then upload the CSR in ssl providing websites like go addy and either generate or re-key the certs

Help and Debugging

nodejs help

To see system usage

df -h
> Filesystem      Size  Used Avail Use% Mounted on
udev            492M   12K  492M   1% /dev
tmpfs           100M  376K   99M   1% /run
/dev/xvda1      7.8G  5.9G  1.6G  80% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            497M     0  497M   0% /run/shm
none            100M     0  100M   0% /run/user

to see free memory

free -m
             total       used       free     shared    buffers     cached
Mem:           992        841        151         17         64        325
-/+ buffers/cache:        450        541
Swap:            0          0          0

checking avaible CPU cores

grep -c ^processor /proc/cpuinfo
> 1 

To see help related to server

node server.js --help
You can manage configuration in the "config.json" file.
Or use following commands:
	node server.js
	node server.js --port=9002
	node server.js --port=9002 --ssl
	node server.js --port=9002 --ssl --sslKey=/home/ssl/ssl.key --sslCert=/home/ssl/ssl.crt


Here is list of all config parameters:
--port=80
	This parameter allows you set any custom port.
--ssl
	This parameter is shortcut for --isUseHTTPs=true
--isUseHTTPs=true
	This parameter allows you force HTTPs. Remove/Skip/Ignore this parameter to use HTTP.
--sslKey=path
	This parameter allows you set your domain's .key file.
--sslCert=path
	This parameter allows you set your domain's .crt file.
--sslCabundle=path
	This parameter allows you set your domain's .cab file.
--version
	Check RTCMultiConnection version number.
--dependencies
	Check all RTCMultiConnection dependencies.
--autoRebootServerOnFailure=false
	Disable auto-restart server.js on failure.
--dirPath=/var/www/html/
	Directory path that is used for HTML/CSS/JS content delivery.
--homePage=/demos/Video-Conferencing.html
	Open a specific demo instead of loading list of demos.
--enableAdmin=true
	Enable /admin/ page.
--adminUserName=username
	/admin/ page's username.
--adminPassword=password
	/admin/ page's password.

Reporting a Vulnerability

Create an issues https://github.com/altanai/webrtc/issues https://github.com/altanai/webrtc/issues

License

MIT

SSH into remote server

Issue1 Permission denied (publickey).

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'xx' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "xx": bad permissions
ubunut@exx: Permission denied (publickey).

solution create a instance for example ec2 instance on AWS and create a ssh key. change the ownership permission for the key and the ssh using it

chmod 600 key.pem
ssh -v -i key.pem ubuntu@ec2-address