{"id":21384532,"url":"https://github.com/titanscouting/mongo-express-req","last_synced_at":"2025-03-16T11:42:05.886Z","repository":{"id":45055014,"uuid":"278663821","full_name":"titanscouting/mongo-express-req","owner":"titanscouting","description":"Get Mongo DB in express vars","archived":false,"fork":false,"pushed_at":"2022-12-31T17:24:14.000Z","size":229,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T23:41:13.617Z","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/titanscouting.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":"2020-07-10T15:05:53.000Z","updated_at":"2022-01-08T23:46:05.000Z","dependencies_parsed_at":"2023-01-31T19:31:11.725Z","dependency_job_id":null,"html_url":"https://github.com/titanscouting/mongo-express-req","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titanscouting%2Fmongo-express-req","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titanscouting%2Fmongo-express-req/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titanscouting%2Fmongo-express-req/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titanscouting%2Fmongo-express-req/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titanscouting","download_url":"https://codeload.github.com/titanscouting/mongo-express-req/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864626,"owners_count":20360355,"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":[],"created_at":"2024-11-22T11:41:49.861Z","updated_at":"2025-03-16T11:42:05.865Z","avatar_url":"https://github.com/titanscouting.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongo-express-req [![Build Status](https://travis-ci.org/floatdrop/mongo-express-req.svg?branch=master)](https://travis-ci.org/floatdrop/mongo-express-req)\n\n\u003e Get db connection in request\n\n\n## Install\n\n```\n$ npm install --save mongo-express-req\n```\n\n\n## Usage\n\n```js\nvar app = require('express')();\n\nvar expressMongoDb = require('mongo-express-req');\napp.use(expressMongoDb('mongodb://localhost/test'));\n\napp.get('/', function (req, res, next) {\n\treq.db // =\u003e Db object\n});\n```\n\n\n## API\n\n### expressMongoDb(uri, [options])\n\n#### uri\n\n*Required*  \nType: `string`\n\n[Connection string uri](http://docs.mongodb.org/manual/reference/connection-string/).\n\n#### options\n\nAll options from [MongoClient](http://mongodb.github.io/node-mongodb-native/2.0/api/MongoClient.html) are accepted as well.\n\n##### property\n\nType: `String`  \nDefault: `db`\n\nProperty on `request` object in which db connection will be stored.\n\n\n## License\n\nMIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) and [Dev Singh](http://github.com/devksingh4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitanscouting%2Fmongo-express-req","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitanscouting%2Fmongo-express-req","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitanscouting%2Fmongo-express-req/lists"}