{"id":15019926,"url":"https://github.com/jaredhanson/locomotive-mongoose","last_synced_at":"2025-10-24T20:30:43.068Z","repository":{"id":1885729,"uuid":"2811560","full_name":"jaredhanson/locomotive-mongoose","owner":"jaredhanson","description":"Mongoose datastore adapter for Locomotive.","archived":false,"fork":false,"pushed_at":"2012-01-31T03:18:53.000Z","size":212,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T03:55:08.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/jaredhanson.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":"2011-11-20T00:15:21.000Z","updated_at":"2024-02-10T18:28:37.000Z","dependencies_parsed_at":"2022-09-07T17:01:47.279Z","dependency_job_id":null,"html_url":"https://github.com/jaredhanson/locomotive-mongoose","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Flocomotive-mongoose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Flocomotive-mongoose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Flocomotive-mongoose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Flocomotive-mongoose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/locomotive-mongoose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238030288,"owners_count":19404859,"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-09-24T19:54:19.791Z","updated_at":"2025-10-24T20:30:42.739Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Locomotive-Mongoose\n\nlocomotive-mongoose is a [Locomotive](https://github.com/jaredhanson/locomotive)\ndatastore adapter for applications using [Mongoose](http://mongoosejs.com/) as\nan object-document mapper (ODM).\n\n## Installation\n\n    $ npm install locomotive-mongoose\n\n## Usage\n\n#### Configure Locomotive\n\nIn `config/environments/all.js`, add the following within the exported\nconfiguration function:\n\n    this.datastore(require('locomotive-mongoose'));\n\n#### Model Aware Helpers\n\nWith Mongoose registered as a datastore, model aware helper functions can now\naccept documents from MongoDB directly as arguments:\n\n    Animal.findById(this.param('id'), function(err, animal) {\n      if (err) { return next(err); }\n      // urlFor() is model aware\n      self.url = self.urlFor(animal);\n      next();\n    });\n\n## Tests\n\n    $ npm install --dev\n    $ make test\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 Jared Hanson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Flocomotive-mongoose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Flocomotive-mongoose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Flocomotive-mongoose/lists"}