3.0.1 • Published 7 years ago
trailpack-waterline v3.0.1
trailpack-waterline
Loads Application Models (in api/models
) into the Waterline ORM; Integrates with trailpack-router to
generate Footprints for routes.
Usage
Configure
// config/main.js
module.exports = {
// ...
packs: [
require('trailpack-waterline')
]
}
Query
// api/services/BirthdayService.js
module.exports = {
/**
* Finds people with the given birthday.
* @return Promise
* @example {
* name: 'Ludwig Beethoven',
* birthday: Sun Dec 16 1770 00:00:00 GMT-0500 (EST),
* favoriteColors: [
* { name: 'yellow', hex: 'ffff00' },
* { name: 'black', hex: '000000' }
* ]
* }
*/
findPeopleWithBirthday (birthday) {
return this.orm.Person.find({ birthday: birthday })
.populate('favoriteColors')
}
}
Contributing
We love contributions! Please check out our Contributor's Guide for more information on how our projects are organized and how to get started.
License
3.0.0-pre.1
7 years ago
3.0.1
7 years ago
3.0.0
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
2.0.0-rc2
7 years ago
2.0.0-rc1
7 years ago
1.0.0-beta-1
8 years ago
1.0.0-alpha-6
8 years ago
1.0.0-alpha-4
8 years ago
1.0.0-alpha-3
8 years ago
1.0.0-alpha-2
8 years ago
0.0.11
8 years ago
0.0.6
8 years ago