Skip to content

Instantly share code, notes, and snippets.

@gutenye
Created August 7, 2016 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gutenye/41ac7f96e9b01c87d12652f989aedde2 to your computer and use it in GitHub Desktop.
Save gutenye/41ac7f96e9b01c87d12652f989aedde2 to your computer and use it in GitHub Desktop.
/**
* Footprints Configuration
* (config.footprints)
*
* Footprints are routes that are auto-generated from your model and controller
* definitions in api/controllers and api/models.
*
* @see http://trailsjs.io/doc/config/footprints
*/
module.exports = {
/**
* Generate routes for controller handlers.
*/
controllers: false,
/**
* Generate conventional Create, Read, Update, and Delete (CRUD) routes for
* each Model.
*/
models: {
options: {
/**
* The max number of objects to return by default. Can be overridden in
* the request using the ?limit argument.
*/
defaultLimit: 10,
/**
* Whether to populate all model associations by default (for "find")
*/
populate: false
},
actions: {
create: true,
find: true,
update: true,
destroy: true,
/**
* Specify which "association" endpoints to activate.
*/
createAssociation: true,
findAssociation: true,
updateAssociation: true,
destroyAssociation: true
}
},
/**
* Prefix your footprint routes
*/
prefix: "",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment