[关闭]
@WrRan 2016-11-09T17:04:45.000000Z 字数 902 阅读 883

sails

Blueprints (Core Hook)

Status

Stability: 1 - Experimental

This feature may change. Please try it out and provide feedback.
If it addresses a use-case that is important to you, tell the core team.

Purpose

This hook's responsibilities are:

  1. Use sails.modules to read blueprints from the user's app into self.middleware.
  2. Bind shadow routes to blueprint actions and controller actions.
  3. Listen for route:typeUnknown on sails, interpret route syntax which should match a blueprint action, and bind the appropriate middleware (this happens when the Router is loaded, after all the hooks.)

Roadmap

runtime configurability of blueprints

// (i.e. if req.options.limit is set, it's likely a ceiling, and while overridable,
/// the ?limit=... param probably shouldn't be allowed to exceed the configured limit in route options / policies)

TODO: finish updating this and adding the many other roadmap items relevant to blueprints...

FAQ

If you have a question that isn't covered here, please feel free to send a PR adding it to this section (even if you don't have the answer!)

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注