{"id":16909301,"url":"https://github.com/doasync/mongoose-global","last_synced_at":"2026-04-18T02:01:35.613Z","repository":{"id":48306184,"uuid":"99370885","full_name":"doasync/mongoose-global","owner":"doasync","description":"Global instance of mongoose with new connection logic","archived":false,"fork":false,"pushed_at":"2023-01-31T21:58:31.000Z","size":14,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T00:32:44.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doasync.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}},"created_at":"2017-08-04T18:43:30.000Z","updated_at":"2017-08-04T18:47:54.000Z","dependencies_parsed_at":"2023-02-16T23:31:14.024Z","dependency_job_id":null,"html_url":"https://github.com/doasync/mongoose-global","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/doasync/mongoose-global","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doasync%2Fmongoose-global","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doasync%2Fmongoose-global/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doasync%2Fmongoose-global/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doasync%2Fmongoose-global/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doasync","download_url":"https://codeload.github.com/doasync/mongoose-global/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doasync%2Fmongoose-global/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-13T18:55:16.256Z","updated_at":"2026-04-18T02:01:35.570Z","avatar_url":"https://github.com/doasync.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Global mongoose instance\n===================\n\nInstallation\n-------------\n\n```bash\nnpm i --save mongoose-global\n```\n\nUsage\n-------------------\n\n```javascript\nconst {mongoose} = require('mongoose-global');\n// or\nconst mongoose = require('mongoose-global')();\n// or\nconst mongoose = require('mongoose-global')(dbURI);\n// or\nconst mongoose = require('mongoose-global').connect(dbURI);\n// or\nconst connectDb = require('mongoose-global');\nconst mongoose = connectDb(dbURI, options);\n```\n\nYou need to connect only once. Then you can just require mongoose anywhere and use.\n\nNew connection logic is used with native promises and `useMongoClient` option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoasync%2Fmongoose-global","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoasync%2Fmongoose-global","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoasync%2Fmongoose-global/lists"}