{"id":18311643,"url":"https://github.com/timb-103/nuxt-mongodb","last_synced_at":"2025-04-05T18:31:51.347Z","repository":{"id":183557406,"uuid":"670374566","full_name":"timb-103/nuxt-mongodb","owner":"timb-103","description":"A simple way to use mongoDB in your Nuxt 3 project.","archived":false,"fork":false,"pushed_at":"2023-08-07T05:13:05.000Z","size":551,"stargazers_count":23,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T13:54:02.527Z","etag":null,"topics":["mongodb","nuxt","nuxt3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timb-103.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-24T23:15:02.000Z","updated_at":"2025-02-09T15:38:31.000Z","dependencies_parsed_at":"2023-07-25T00:02:28.837Z","dependency_job_id":null,"html_url":"https://github.com/timb-103/nuxt-mongodb","commit_stats":null,"previous_names":["timb-103/nuxt-mongodb"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timb-103%2Fnuxt-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timb-103%2Fnuxt-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timb-103%2Fnuxt-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timb-103%2Fnuxt-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timb-103","download_url":"https://codeload.github.com/timb-103/nuxt-mongodb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247383921,"owners_count":20930376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mongodb","nuxt","nuxt3"],"created_at":"2024-11-05T16:18:54.926Z","updated_at":"2025-04-05T18:31:50.489Z","avatar_url":"https://github.com/timb-103.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Nuxt MongoDB\n\nA simple way to use mongoDB in your Nuxt 3 project.\n\n## Usage\n\nInstall the module:\n\n```sh\nnpm i -D nuxt-mongodb\n```\n\nAdd `nuxt-mongodb` in the `modules` array in `nuxt.config.ts`:\n\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-mongodb'],\n})\n```\n\nAdd your mongo connection string and main database name in your `.env` file:\n\n```env\nMONGO_CONNECTION_STRING={{your_mongo_connection_string}}\nMONGO_DB={{your_mongo_db_name}}\n```\n\nWhen you start your project, mongo will connect and you can use it like this:\n\n```js\nimport { mongo } from '#nuxt-mongodb'\n\nconst db = mongo.db()\nconst response = await db.collection('YOUR_COLLECTION').find()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimb-103%2Fnuxt-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimb-103%2Fnuxt-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimb-103%2Fnuxt-mongodb/lists"}