🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

seapeer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seapeer

Seaport client and server combined with automatic failover

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

seapeer

Seaport client and server combined with automatic failover

npm install seapeer

build status

This module allows you to run seaport without explicitly starting a seaport server. Instead one of the clients accessing seaport will become the server. If that client dies another one will take his place

Usage

var seapeer = require('seapeer')

// 9090 is the port that will be used (should be the same in all clients)
var ports = seapeer(9090)

ports.on('master', function() {
  console.log('i am hosting the server now')
})

// register an app
ports.register('web', {port:10000})

ports.get('web', function(ps) {
  console.log('web:', ps)
})

Try running the above example in a couple of processes

License

MIT

FAQs

Package last updated on 18 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts