Page Contents

See also:

See also:

概要

有下面3种方式为你的应用在model里面添加相关的业务逻辑:

  • 远程方法(Remote methods) - 将REST endpoints映射成对应的Node function。
  • 远程钩子 - 在一个远程方法被调用的前后去触发你的业务逻辑。
  • 模型钩子 - 在一个模型的生命周期中(创建,删除,等)去触发你的业务逻辑。

Each method has its own individual configurations you can make to further refine the timing of your custom logic. In any case, you will be required to code your own logic as LoopBack simply provides the mechanisms to trigger your predefined logic at various stages of the model’s life cycle.