Socket
Socket
Sign inDemoInstall

@swarthy/wait-for

Package Overview
Dependencies
51
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @swarthy/wait-for

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


Version published
Weekly downloads
76
decreased by-10.59%
Maintainers
1
Install size
2.57 MB
Created
Weekly downloads
 

Readme

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

Last updated on 31 Mar 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc