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

@swarthy/wait-for

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swarthy/wait-for

Wait for (PostgresSQL|RabbitMQ|Redis) server is available

  • 2.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

wait-for

npm Build Status

wait-for will try connect to server then exit with code 0 if server is available and 1 otherwise.

Usage

PostgreSQL

wait-for --postgresql postgres://postgres@localhost && npm run test-integration
# or
POSTGRESQL_URI=postgres://postgres@localhost wait-for --postgresql && npm run test-integration

RabbitMQ

wait-for --rabbitmq amqp://localhost && npm run test-integration
# or
RABBITMQ_URI=amqp://localhost wait-for --rabbitmq && npm run test-integration

Redis

wait-for --redis redis://localhost && npm run test-integration
# or
REDIS_URI=redis://localhost wait-for --redis && npm run test-integration

Example

Wait for PostgreSQL, RabbitMQ and Redis (configured via environment)

wait-for --postgresql --rabbitmq --redis && npm run test-integration

Configuration

CLI argumentEnvironment variableDescriptionDefault
--postgressqlPOSTGRESQL_URIConnection string
--rabbitmqRABBITMQ_URIConnection string
--redisREDIS_URIConnection string
-c, --max-attemptsMax attempt count60
-d, --delayDelay between attempts1000
-q, --quietQuiet mode

Used packages

amqplib pg redis

Keywords

FAQs

Package last updated on 31 Mar 2021

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