Lightweight CLI tool that waits for a MongoDB server to be ready by repeatedly attempting a connection to the provided URI with a configurable retry interval. Version 1.0.3 (latest) offers a simple, no-dependency approach focusing solely on connection readiness. Unlike heavier alternatives like docker-compose wait scripts, this package provides a minimal, portable solution for CI/CD pipelines and orchestration scenarios where only connection availability is needed. Release cadence is low; no active development.
npm install wait-for-mongodb-slimNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Waits for MongoDB to accept connections at URI mongodb://localhost:27017/test, checking every 2 seconds.
If you need a programmatic wait function, use a different library like wait-for-mongo (non-slim) or write your own.
Use --t with the number of seconds (e.g., --t 2 for 2 seconds).
Run with npx: npx wait-for-mongodb-slim --uri ...
Ensure URI is correct: mongodb://user:pass@host:port/db
No dependency data recorded yet.