https://github.com/samuelmarks/restify-orm-framework
[old version, use https://github.com/SamuelMarks/restify-orm-scaffold now] Utility functions for integrating ORMs with restify; framework-style
https://github.com/samuelmarks/restify-orm-framework
Last synced: over 1 year ago
JSON representation
[old version, use https://github.com/SamuelMarks/restify-orm-scaffold now] Utility functions for integrating ORMs with restify; framework-style
- Host: GitHub
- URL: https://github.com/samuelmarks/restify-orm-framework
- Owner: SamuelMarks
- Created: 2016-05-30T06:25:25.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T12:41:48.000Z (over 8 years ago)
- Last Synced: 2025-01-28T04:31:59.889Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 77.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
restify-orm-framework
=====================
Utility functions for integrating ORMs with restify; framework-style.
If using TypeScript, install `typings` with:
typings install github:SamuelMarks/restify-orm-framework/restify-orm-framework.d.ts --save
Otherwise just use the [restify-orm-framework-dist](https://github.com/SamuelMarks/restify-orm-framework-dist) compiled output.
## Supports
- [Sequelize](https://github.com/sequelize/sequelize)
- [TypeORM](https://github.com/typeorm/typeorm)
- [Waterline](https://github.com/balderdashy/waterline)
## Idea
Have this directory structure:
── main.[js|ts]
── api
│ ├── auth
│ │ ├── middleware.[js|ts]
│ │ ├── models.[js|ts]
│ │ └── routes.[js|ts]
│ └── user
│ ├── models.[js|ts]
│ ├── routes.[js|ts]
│ └── utils.[js|ts]
Where the main file doesn't import any models or routes explicitly.
Models, routes and tests can be cleanly isolated also.
Example: [restify-orm-scaffold](https://github.com/SamuelMarks/restify-orm-scaffold)
## Miscellaneous
Clone [restify-orm-framework-dist](https://github.com/SamuelMarks/restify-orm-framework-dist) one dir above where this repo was cloned, then synchronise with:
find -type f -not -name "*.ts" -and -not -path "./.git/*" -and -not -path "./node-modules/*" -and -not -name '*.map' | cpio -pdamv ../restify-orm-framework-dist