{"id":13785451,"url":"https://github.com/vapor-community/mongo-driver","last_synced_at":"2025-04-29T00:58:24.463Z","repository":{"id":104073490,"uuid":"59142627","full_name":"vapor-community/mongo-driver","owner":"vapor-community","description":"MongoDB driver for Fluent","archived":false,"fork":false,"pushed_at":"2018-10-26T13:18:40.000Z","size":123,"stargazers_count":28,"open_issues_count":9,"forks_count":26,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-30T19:01:50.027Z","etag":null,"topics":["fluent","fluent-driver","vapor"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/vapor-community.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-18T18:51:06.000Z","updated_at":"2023-05-17T18:11:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"9642f800-8088-4116-99f3-630259556734","html_url":"https://github.com/vapor-community/mongo-driver","commit_stats":null,"previous_names":["vapor/mongo-driver"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fmongo-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fmongo-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fmongo-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fmongo-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-community","download_url":"https://codeload.github.com/vapor-community/mongo-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251414226,"owners_count":21585609,"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":["fluent","fluent-driver","vapor"],"created_at":"2024-08-03T19:01:00.523Z","updated_at":"2025-04-29T00:58:24.419Z","avatar_url":"https://github.com/vapor-community.png","language":"Swift","funding_links":[],"categories":["Database Connectors"],"sub_categories":["MongoDB"],"readme":"# Mongo Driver for Fluent\n\n![Swift](http://img.shields.io/badge/swift-3.1-brightgreen.svg)\n[![Slack Status](http://vapor.team/badge.svg)](http://vapor.team)\n\n## Install the MongoDB server\n\nFor more instructions, check out https://docs.mongodb.com/master/administration/install-community/.\n\n### OS X\n\n```shell\nbrew install mongodb\n```\n\n### Ubuntu\n\n```shell\nsudo apt-get update\nsudo apt-get install mongodb\n```\n\n## Run the MongoDB server\n\n```shell\nmongod\n```\n\n## Connecting to MongoDB with Fluent\n\nYou need to edit `Config/fluent.json` to define mongo as the underlying database technology to use as driver for Fluent:\n\n```json\n{ \n    \"driver\": \"mongo\" \n}\n```\n\nCreating a driver is done using the [MongoDB Connection String URI Format](https://docs.mongodb.com/manual/reference/connection-string/). Initializing a `MongoDriver` such a URI will attempt a connection to MongoDB.\n\n```swift\nimport MongoDriver\nimport Fluent\n\nlet driver = try MongoDriver(\"mongodb://localhost\")\nlet db = Fluent.Database(driver)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fmongo-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-community%2Fmongo-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fmongo-driver/lists"}