waterline-models
Auto loads waterline models from a directory
Looking for another maintainer. I no longer use waterline and would like to have someone else take over. If you are interested, please reach out. Otherwise, eventually I will have this package removed. I doubt this module is used enough for people to read this, but in case it is read, there's your notice.
Installation
npm install --save waterline-models
Usage
models/user.js
moduleexports = identity: 'user' connection: 'default' attributes: firstName: 'string' lastName: 'string' ;
app.js
var path = ;var waterlineModels = ;waterlineModels; // This could be in another filevar User = 'user'; // pass in the identity User ;
Options
cwd
The cwd directory to work off of when reading from the models directory
Default: process.cwd()
dir
The path to your models directory
Default: 'models'
defaultCollection
All other options are passed into waterline's initialize
method as the
configuration which is documented
here.