{"id":15154453,"url":"https://github.com/jarenal/wait4mongodb","last_synced_at":"2026-02-07T04:32:07.143Z","repository":{"id":137566444,"uuid":"130476955","full_name":"jarenal/wait4mongodb","owner":"jarenal","description":"Wait For MongoDB is a little NodeJS module that will execute a task as soon MongoDB is ready. Very useful for multi container environments like Docker Compose.","archived":false,"fork":false,"pushed_at":"2018-04-29T17:18:25.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T03:28:09.560Z","etag":null,"topics":["callback","docker","docker-compose","interval","mongo","mongod","mongodb","mongodb-database","nodejs","timeout","wait-for-it"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarenal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-21T13:36:10.000Z","updated_at":"2018-05-02T00:44:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"32fe76dd-d9cf-46aa-a05b-a500a22fa748","html_url":"https://github.com/jarenal/wait4mongodb","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"d6276656070bb2265fbbfca8ab58b0f635f04931"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jarenal/wait4mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarenal%2Fwait4mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarenal%2Fwait4mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarenal%2Fwait4mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarenal%2Fwait4mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarenal","download_url":"https://codeload.github.com/jarenal/wait4mongodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarenal%2Fwait4mongodb/sbom","scorecard":{"id":506503,"data":{"date":"2025-08-11","repo":{"name":"github.com/jarenal/wait4mongodb","commit":"d6276656070bb2265fbbfca8ab58b0f635f04931"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: ISC License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-4jwp-vfvf-657p","Warn: Project is vulnerable to: GHSA-v8w9-2789-6hhr","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-675m-85rw-j3w4","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mh5c-679w-hh4r","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T23:21:04.302Z","repository_id":137566444,"created_at":"2025-08-19T23:21:04.302Z","updated_at":"2025-08-19T23:21:04.302Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29186736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T03:35:06.566Z","status":"ssl_error","status_checked_at":"2026-02-07T03:34:57.604Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["callback","docker","docker-compose","interval","mongo","mongod","mongodb","mongodb-database","nodejs","timeout","wait-for-it"],"created_at":"2024-09-26T17:40:20.409Z","updated_at":"2026-02-07T04:32:07.127Z","avatar_url":"https://github.com/jarenal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wait4MongoDB\n\nWait For MongoDB is a little NodeJS module that will execute a task as soon MongoDB is ready. Very useful for multi container environments like Docker Compose.\n\n## Installing\n\nExecute the next command line for to install the module using npm.\n\n```\nnpm install wait4mongodb --save\n```\n\n## Running the tests\n\nRun the tests using the next command.\n\n```\nnpm test\n```\n\n## Usage\n\n### Parameters\n\n```javascript\nwait4mongodb.tryConnect(url, times, interval, [options], [callback]);\n````\n\n* **url**: The connection URI string\n* **times**: How many times will try to connect.\n* **interval**: Time in milliseconds between retries.\n* **options (optional)**: MongoClient settings. See [MongoClient documentation](http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html) for more info.\n* **callback (optional)**: Callback function.\n\n### Using callbacks\n\n```javascript\nconst wait4mongodb = require('wait4mongodb');\n\n/* The next example will try to connect to MongoDB 20 times (every 500 milliseconds) \n *   and will return a timeout (if MongoDB is down) after 10 sec. \n */\nwait4mongodb.tryConnect('mongodb://localhost:27017', 20, 500, {poolSize: 3}, (err, client) =\u003e {\n  if (err) {\n    console.log('MongoDB timeout');\n  } else {\n    console.log('MongoDB is ready!');\n    // You will have available MongoDB client from here.\n  }\n});\n```\n\n### Using Promises\n\n```javascript\nconst wait4mongodb = require('wait4mongodb');\n\n/* The next example will try to connect to MongoDB 20 times (every 500 milliseconds) \n *   and will return a timeout (if MongoDB is down) after 10 sec. \n */\nwait4mongodb.tryConnect('mongodb://localhost:27017', 20, 500, {poolSize: 3}).then(client =\u003e {\n  console.log('MongoDB is ready!');\n  // You will have available MongoDB client from here.\n}).catch(err =\u003e {\n  console.log('MongoDB timeout');\n});\n```\n\n## Authors\n\n* **Jose Antonio** - *Initial work*\n\n## Donations\n\nIf you found this useful. Please, consider support with a small donation:\n\n* **BTC** - 1PPn4qvCQ1gRGFsFnpkufQAZHhJRoGo2g5\n* **BCH** - qr66rzdwlcpefqemkywmfze9pf80kwue0v2gsfxr9m\n* **ETH** - 0x5022cf2945604CDE2887068EE46608ed6B57cED8\n\n## License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* Project inspired on [arunoda/wait-for-mongo](https://github.com/arunoda/wait-for-mongo).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarenal%2Fwait4mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarenal%2Fwait4mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarenal%2Fwait4mongodb/lists"}