ship-hold-models-loader
load ship-hold models based on convention
install
npm install ship-hold-models-loader
usage
assuming you have
.
|
|---models
| |----Users.js
| |----Products.js
Users.js and Products.js following the regular ship-hold model definition pattern
module{ return table:'users' columns:{} relations:{} ;};
then use ship-hold-models-loader
const sh = /* options */const models = sh // can pass options here modelsProducts === sh; // true
options to path the factory
- folder: the folder to read through to find the model files (default './models')
- exclude: an array of file to exclude (default empty array)