Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@custody/plugin-clear-port-conflicts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@custody/plugin-clear-port-conflicts

Custody plugin to clear port conflicts between processes

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

custody-plugin-command-clear-port-conflicts

If you're using Supervisor for local development of microservices, the processes launched by Supervisor are probably not the servers themselves but rather build processes, which in turn launch the servers. The process tree might look something like this:

supervisord
  - gulp (using gulp-nodemon)
    - node

Something in this chain tends to lose the server process, so that it keeps running, but no longer under Supervisor control. When, eventually, the "supervised" process starts/restarts, the new server crashes with an EADDRINUSE error.

This custody plugin can automatically fix such port conflicts.

Installation

npm install -g @custody/plugin-command-clear-port-conflicts

Then launch custody-cli settings and add "@custody/plugin-command-clear-port-conflicts" to your .custodyrc. Finally, restart custody-cli to get it to pick up the new plugin.

This module requires that you instrument every process you wish to de-conflict with @custody/probe, please configure that before proceeding. This is because this plugin requires @custody/probe to report the EADDRINUSE error, as described here.

Usage

Once you've set up the plugin and probe(s) as described above, this plugin will operate automatically.

How it works

When the plugin detects a port conflict, it will kill the process listening to your desired port, then restart the supervised process.

Contributing

We welcome bug reports and feature suggestions!

Keywords

FAQs

Package last updated on 25 Oct 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc