{"id":24746636,"url":"https://github.com/samuelmarks/orm-mw","last_synced_at":"2026-04-16T14:32:04.697Z","repository":{"id":24134885,"uuid":"100716412","full_name":"SamuelMarks/orm-mw","owner":"SamuelMarks","description":"Generic--connect, restify, express--middleware adding connection to 0-k ORMs to a `.getDb` method on `req`.","archived":false,"fork":false,"pushed_at":"2024-04-14T01:00:36.000Z","size":709,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T04:32:00.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelMarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2017-08-18T13:48:56.000Z","updated_at":"2023-07-27T12:02:39.000Z","dependencies_parsed_at":"2025-01-28T04:29:52.846Z","dependency_job_id":"567e72ff-282b-4413-a176-028d6ae38a18","html_url":"https://github.com/SamuelMarks/orm-mw","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/SamuelMarks%2Form-mw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Form-mw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Form-mw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Form-mw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelMarks","download_url":"https://codeload.github.com/SamuelMarks/orm-mw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245042145,"owners_count":20551525,"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":"2025-01-28T04:29:44.682Z","updated_at":"2026-04-16T14:31:59.665Z","avatar_url":"https://github.com/SamuelMarks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"orm-mw\n======\n[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n![npm-publish](https://github.com/SamuelMarks/orm-mw/workflows/npm-publish/badge.svg)\n[![NPM version](https://img.shields.io/npm/v/@offscale/orm-mw.svg)](https://www.npmjs.com/package/@offscale/orm-mw)\n\nGeneric--connect, restify, express--middleware adding connection to 0-k ORMs to a `.getDb` method on `req`.\n\nSupported ORMs:\n\n - [Sequelize](https://github.com/sequelize/sequelize)\n - [TypeORM](https://github.com/typeorm/typeorm)\n - [Waterline](https://github.com/balderdashy/waterline)\n \nSupported cursors:\n\n - [Redis](https://github.com/luin/ioredis)\n\n## Install\n\n    npm i -S @offscale/orm-mw\n\n## Usage\n\n    import { ormMw } from '@offscale/orm-mw';\n\n    server.use(ormMw(/*IOrmMwConfig*/));\n\n### Explicit cleanup\n\nEssentially only useful for tests:\n\n    import { tearDownConnections } from '@offscale/orm-mw';\n    \n    tearDownConnections(/*ormsInArgs*/, err =\u003e {\n        if (err != null) throw err; \n    });\n\n## Configuration\n\nSee `IOrmMwConfig` interface in [orm-mw.d.ts](https://github.com/SamuelMarks/orm-mw).\n\n## Extending\n\nAdding a new ORM? - Expand the `IOrmMwConfig` interface, and add a new short-function that implements it. See others for reference.\n\n### Development setup\n\nInstall the latest Node.JS, `npm i -g typings typescript`, then:\n\n    git clone https://github.com/SamuelMarks/orm-mw\n    cd orm-mw\n    typings i\n    npm test\n\n## Future work\n\n  - Add more ORMs and cursors\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Form-mw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmarks%2Form-mw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Form-mw/lists"}