baucis-vivify

1.0.1 • Public • Published

baucis-vivify

A module for adding child controller paths

controller.vivify

This can be used to add paths under a controller. For example, a teacher schema might define an array of classrooms. controller.vivify lets embed the classrooms associated with a teacher at a URL like /teacher/123/classrooms.

var teachers = baucis.rest('teacher');
var classrooms = teachers.vivify('classrooms');

controller.parentPath

This can be used to note the path the schema defines that is associated with a vivified URL. For example, in the above example, if the classroom schema didn't use the field teacher to link to the teachers collection, but instead used a name of classTeachers:

var teachers = baucis.rest('teacher');
var classrooms = teachers.vivify('classrooms').parentPath('classTeachers');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    7
  • 1.0.0
    0
  • 0.21.0
    0
  • 0.20.0
    0

Package Sidebar

Install

npm i baucis-vivify

Weekly Downloads

7

Version

1.0.1

License

MIT

Last publish

Collaborators

  • wprl