{"id":14956949,"url":"https://github.com/owenpotent/mongo-go","last_synced_at":"2026-02-25T19:11:05.994Z","repository":{"id":57301580,"uuid":"401321370","full_name":"OwenPotent/mongo-go","owner":"OwenPotent","description":"An easy to use database handler for MongoDB, inspired by quick.db!","archived":false,"fork":false,"pushed_at":"2024-01-31T13:06:03.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T07:28:42.620Z","etag":null,"topics":["database","mongo","mongo-go","mongodb","mongodb-database","mongoose","mongoosejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mongo-go","language":"TypeScript","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/OwenPotent.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}},"created_at":"2021-08-30T11:37:44.000Z","updated_at":"2024-01-20T06:12:57.000Z","dependencies_parsed_at":"2024-01-31T14:27:31.304Z","dependency_job_id":"c5eec222-02b9-4f94-be38-2174eb96d2f5","html_url":"https://github.com/OwenPotent/mongo-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OwenPotent/mongo-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenPotent%2Fmongo-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenPotent%2Fmongo-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenPotent%2Fmongo-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenPotent%2Fmongo-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OwenPotent","download_url":"https://codeload.github.com/OwenPotent/mongo-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenPotent%2Fmongo-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281139048,"owners_count":26450136,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"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":["database","mongo","mongo-go","mongodb","mongodb-database","mongoose","mongoosejs"],"created_at":"2024-09-24T13:13:46.864Z","updated_at":"2025-10-26T16:42:39.597Z","avatar_url":"https://github.com/OwenPotent.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MongoGo\n\nAn easy to use database handler for MongoDB, inspired by quick.db! MongoGo handles the hard part in getters, setters, and much more!\n\n## Installation\n\nUsing NPM:\n\n```shell\nnpm install mongo-go\n```\n\nUsing Yarn:\n\n```shell\nyarn add mongo-go\n```\n\n## Getting Started\n\nTo get started with using MongoGo, import the default class from the package.\n\n```js\n// Using Node.js `require()`\nconst MongoGo = require(\"mongo-go\");\n\n// Using ES6 imports\nimport MongoGo from \"mongo-go\"\n```\n\n## Overview\n\n**Connecting to MongoDB**\n\nFirst, we need to establish a connection. MongoGo handles it easily by defining a new `instance` of MongoGo. A function `\u003cMongoGo\u003e.ready()` is then fired when you start your app. The only parameter needed is a `MongoURI` or if your using a localhost, use `mongodb://localhost:27017/my_database`.\n\nHere is an example:\n\n```js\nconst MongoClient = new MongoGo(\"mongodb://localhost:27017/my_database\")\n```\n\nYou don't have to pass in another method to connect it by yourself, once you've started the app, it'll start a connection to the cloud and return a `Connection`.\n\n**Important!** Due to an issue with the Mongoose's `ConnectionOptions` option, `useNewURLParser` isn't use during the connection, in some case, an error or warning might pop-up whilst connecting.\n\n**Do we have to define a model/schema?**  \nNope, like we said, MongoGo handles it all! it uses 2 parameters in a built-in `model` we made, which are a \"key\" and a \"value\".\n\n- A `\"key\"` is also the id, which is used to set a new `Object`, get the data from the `\"key\"` and others. The `\"key\"` parameter **must** always be a `String` type value.\n- A `\"value\"` is just the data that will be stored with the `\"key\"` together in an `Object` literal in the database. A `\"value\"` can be any type of value!\n\n### Methods\n\nCurrently, all method returns a `Promise`.\n\n#### get\n\n```js\nconst data = await \u003cMongoGo\u003e.get(\"Hello\")\n```\n\n#### set\n\n```js\nawait \u003cMongoGo\u003e.set(\"Hello\", \"World\")\n```\n\n#### delete\n\n```js\nawait \u003cMongoGo\u003e.delete(\"Hello\")\n```\n\n#### push\n\n```js\nawait \u003cMongoGo\u003e.push(\"Hello\", [\"World\", \"Earth\", \"Moon\"...])\n```\n\n#### collection\n\n```js\nconsole.log(\u003cMongoGo\u003e.collection)\n```\n\n**Important!**  \nKeep it mind that `\u003cMongoGo\u003e` is just an example instance, you may rename it to your own likings.\n\n## License\n\nMongoGo is licensed under the MIT license. See [LICENSE](https://github.com/git/git-scm.com) for more information.\n\n## Updates\n\n- **1.0.0**\n  - Initial release\n- **1.1.0**\n  - Added `push` method\n  - Added `collection` getter\n  - Added `logger` class","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowenpotent%2Fmongo-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowenpotent%2Fmongo-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowenpotent%2Fmongo-go/lists"}