Page Contents

The following pages are tagged with

Adding application logic When building an application, you’ll generally need to implement custom logic to process data and perform other operations before responding to client requests. In LoopBack, there are three ways to do this: Adding logic to models - adding remote methods, remote hooks and operation hooks. Defining boot...
Adding remote methods to built-in models To add a remote method to a  built-in model, you can either  extend the model and add the remote method to your new model, or add it in a boot script, as described here by way of example. This example adds a “greet” method the built-in User model....
Connector hooks Connector hooks are triggered by actions of connectors.
Model hooks Model hooks are deprecated, except for afterInitialize.
Operation hooks Operation hooks are triggered by all methods that execute a particular high-level create, read, update, or delete operation.
Remote hooks Overview LoopBack provides two kinds of hooks: Remote hooks, that execute before or after calling a remote method, either a custom remote method  or a standard create, retrieve, update, and delete method inherited from PersistedModel. See PersistedModel REST API for information on how the Node methods correspond to REST...
Remote methods A remote method is a static method of a model, exposed over a custom REST endpoint.
Tutorial: Adding application logic Demonstrates remote methods, remote hooks, model operation hooks, boot scripts, middleware, and using the email connector in a LoopBack application.