By default, Sails controllers automatically bind routes for each of their functions. Additionally, each controller will automatically bind routes for a CRUD API controlling the model which matches its name, if one exists.
||true||Whether routes are automatically generated for every action in your controllers (also maps
||true||Automatic REST blueprints enabled? e.g.
||true||These CRUD shortcuts exist for your convenience during development, but you'll want to disable them in production.:
||''||Optional mount path prefix for blueprints (the automatically bound routes in your controllers) e.g. '/api/v2'|
||''||Optional mount path prefix for RESTful blueprints (the automatically bound RESTful routes for your controllers and models) e.g. '/api/v2'. Will be joined to your
||false||Optionally use plural controller names in blueprint routes, e.g.
||true||Whether the blueprint controllers should populate model fetches with data from other models which are linked by associations. If you have a lot of data in one-to-many associations, leaving this on may result in very heavy api calls.|
||30||The default number of records to show in the response from a "find" action. Doubles as the default size of populated arrays if
||true||Whether to run
||false||Optionally wrap blueprint JSON responses in a JSONP callback using
Is something missing?
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.
- Blueprint API
- Command Line Interface
- Response (`res`)
- Waterline (ORM)
- Resourceful PubSub
- Socket Client
We wrote a book!
Get early access to the book
with promotion code: mcneildoc