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

wait-for-port

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

wait-for-port

wait for host/port to become available

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

What?

Implements a single NodeJS function to wait for host/port to become available. Once available, a callback is called.

Example:

var waitForPort = require('wait-for-port');

waitForPort('my-host.com', 22, function(err) {
  if (err) throw new Error(err);
  // .. now we know that (at least for now) my-host.com is
  // listening on port 22
});

Check the specs for details and options.

Why?

This is useful e.g. when provisioning cloud stuff, e.g. call the EC2 API from Javascript to create instances, then wait for ssh to become available on all the hosts.

Keywords

FAQs

Package last updated on 10 Apr 2016

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