UNPKG

@loopback/docs

Version:
1,590 lines (1,098 loc) 36.4 kB
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/code-themes/sl-theme.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div class="navbar navbar-inverse navbar-static-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">docs.strongloop.com</a> </div> <div id="modules"></div> </div> <div class="row"> <div class="col-lg-3 column scroll-spy-target"> <ul class="nav nav-pills nav-stacked"> <div id="versions"></div> <li class="depth-3"> <a href="#Application">Class: Application</a> </li> <li class="depth-4"> <a href="#Application.constructor">constructor()</a> </li> <li class="depth-4"> <a href="#Application.prototype.options">options</a> </li> <li class="depth-4"> <a href="#Application.prototype.component">component()</a> </li> <li class="depth-4"> <a href="#Application.prototype.controller">controller()</a> </li> <li class="depth-4"> <a href="#Application.prototype.getServer">getServer()</a> </li> <li class="depth-4"> <a href="#Application.prototype.server">server()</a> </li> <li class="depth-4"> <a href="#Application.prototype.servers">servers()</a> </li> <li class="depth-4"> <a href="#Application.prototype.start">start()</a> </li> <li class="depth-4"> <a href="#Application.prototype.stop">stop()</a> </li> <li class="depth-3"> <a href="#ApplicationConfig">Interface: ApplicationConfig</a> </li> <li class="depth-3"> <a href="#ControllerClass">Type: ControllerClass</a> </li> <li class="depth-3"> <a href="#Component">Interface: Component</a> </li> <li class="depth-4"> <a href="#Component.prototype.controllers">controllers</a> </li> <li class="depth-4"> <a href="#Component.prototype.providers">providers</a> </li> <li class="depth-4"> <a href="#Component.prototype.servers">servers</a> </li> <li class="depth-3"> <a href="#ProviderMap">Interface: ProviderMap</a> </li> <li class="depth-3"> <a href="#mountComponent">mountComponent()</a> </li> <li class="depth-3"> <a href="#CoreBindings">Namespace: CoreBindings</a> </li> <li class="depth-4"> <a href="#CoreBindings.APPLICATION_CONFIG">APPLICATION_CONFIG</a> </li> <li class="depth-4"> <a href="#CoreBindings.APPLICATION_INSTANCE">APPLICATION_INSTANCE</a> </li> <li class="depth-4"> <a href="#CoreBindings.CONTROLLER_CLASS">CONTROLLER_CLASS</a> </li> <li class="depth-4"> <a href="#CoreBindings.CONTROLLER_CURRENT">CONTROLLER_CURRENT</a> </li> <li class="depth-4"> <a href="#CoreBindings.CONTROLLER_METHOD_META">CONTROLLER_METHOD_META</a> </li> <li class="depth-4"> <a href="#CoreBindings.CONTROLLER_METHOD_NAME">CONTROLLER_METHOD_NAME</a> </li> <li class="depth-4"> <a href="#CoreBindings.SERVERS">SERVERS</a> </li> <li class="depth-3"> <a href="#Server">Interface: Server</a> </li> <li class="depth-4"> <a href="#Server.prototype.listening">listening</a> </li> <li class="depth-4"> <a href="#Server.prototype.start">start()</a> </li> <li class="depth-4"> <a href="#Server.prototype.stop">stop()</a> </li> </ul> </div> <div class="col-lg-9 col-lg-offset-3 column" data-spy="scroll" data-target=".scroll-spy-target" data-offset="0"> <div class="readability"> <section class="code-doc "> <a name="Application"></a> <h3 class="code-ref">Class: application = new Application()</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="Application.prototype.options"></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code><a href="#ApplicationConfig">ApplicationConfig</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> constructorProperty exported public </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.constructor"></a> <h4 class="code-ref">constructor(options: <a href="#ApplicationConfig">ApplicationConfig</a>) : <a href="#Application">Application</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> options </strong> </td> <td class="code-arg-types"> <code><a href="#ApplicationConfig">ApplicationConfig</a></code> </td> <td class="code-arg-default-value"> {} </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.component"></a> <h4 class="code-ref">component(componentCtor: <a href="#Constructor">Constructor</a>&lt;<a href="#Component">Component</a>&gt;, name: undefined | string) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Add a component to this application and register extensions such as controllers, providers, and servers from the component.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> componentCtor </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;<a href="#Component">Component</a>&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The component class to add.</p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> name </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Optional component name, default to the class name</p> <pre><code class="language-ts"> export class ProductComponent { controllers = [ProductController]<span class="hljs-comment">;</span> repositories = [ProductRepo, UserRepo]<span class="hljs-comment">;</span> providers = { [AUTHENTICATION_STRATEGY]: AuthStrategy, [AUTHORIZATION_ROLE]: Role, }<span class="hljs-comment">;</span> }<span class="hljs-comment">;</span> <p>app.component(ProductComponent)<span class="hljs-comment">;</span></code></pre></p> </p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.controller"></a> <h4 class="code-ref">controller(controllerCtor: <a href="#ControllerClass">ControllerClass</a>, name: undefined | string) : <a href="#Binding">Binding</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Register a controller class with this application.</p> </p> <p></p> </div> Returns: <p><p>The newly created binding, you can use the reference to further modify the binding, e.g. lock the value to prevent further modifications.</p> <pre><code class="language-ts"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-type">MyController</span> { } app.controller(<span class="hljs-type">MyController</span>).lock();</span></code></pre> </p> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> controllerCtor </strong> </td> <td class="code-arg-types"> <code><a href="#ControllerClass">ControllerClass</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>The controller class (constructor function).</p> </p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> name </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Optional controller name, default to the class name</p> </p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.getServer"></a> <h4 class="code-ref">getServer(target: <a href="#Constructor">Constructor</a>&lt;T&gt; | <a href="#String">String</a>) : <a href="#Promise">Promise</a>&lt;T&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Retrieve the singleton instance for a bound constructor.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> target </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;T&gt; | <a href="#String">String</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.server"></a> <h4 class="code-ref">server(ctor: <a href="#Constructor">Constructor</a>&lt;T&gt;, name: undefined | string) : <a href="#Binding">Binding</a></h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Bind a Server constructor to the Application&#39;s master context. Each server constructor added in this way must provide a unique prefix to prevent binding overlap.</p> </p> <p><pre><code class="language-ts">app.server(RestServer); // This server<span class="hljs-keyword"> constructor</span> will be bound under <span class="hljs-string">"servers.RestServer"</span>. app.server(RestServer, <span class="hljs-string">"v1API"</span>); // This server<span class="hljs-built_in"> instance </span>will be bound under <span class="hljs-string">"servers.v1API"</span>.</code></pre> </p> </div> Returns: <p><p>Binding for the server class</p> </p> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> ctor </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;T&gt;</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> name </strong> </td> <td class="code-arg-types"> <code>undefined | string</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>Optional override for key name.</p> </p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.servers"></a> <h4 class="code-ref">servers(ctors: <a href="#Constructor">Constructor</a>&lt;T&gt;[]) : <a href="#Binding">Binding</a>[]</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Bind an array of Server constructors to the Application&#39;s master context. Each server added in this way will automatically be named based on the class constructor name with the &quot;servers.&quot; prefix.</p> </p> <p><p>If you wish to control the binding keys for particular server instances, use the app.server function instead.</p> <pre><code class="language-ts">app.servers([ RestServer, GRPCServer, ]); <span class="hljs-regexp">//</span> Creates a binding <span class="hljs-keyword">for</span> <span class="hljs-string">"servers.RestServer"</span> and a binding <span class="hljs-keyword">for</span> <span class="hljs-regexp">//</span> <span class="hljs-string">"servers.GRPCServer"</span>;</code></pre> </p> </div> Returns: <p><p>An array of bindings for the registered server classes</p> </p> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> ctors </strong> </td> <td class="code-arg-types"> <code><a href="#Constructor">Constructor</a>&lt;T&gt;[]</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p><p>An array of Server constructors.</p> </p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Application.prototype.start"></a> <h4 class="code-ref">start() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Start the application, and all of its registered servers.</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="Application.prototype.stop"></a> <h4 class="code-ref">stop() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Stop the application instance and all of its registered servers.</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="ApplicationConfig"></a> <h3 class="code-ref">Interface: ApplicationConfig</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Configuration for application</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="ControllerClass"></a> <h3 class="code-ref">Type alias: ControllerClass = Constructor</h3> </section> <section class="code-doc "> <a name="Component"></a> <h3 class="code-ref">Interface: Component</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>A component declares a set of artifacts so that they cane be contributed to an application as a group</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="Component.prototype.controllers"></a> <strong class="code-arg-name"> controllers </strong> </td> <td class="code-arg-types"> <code><a href="#ControllerClass">ControllerClass</a>[]</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>An array of controller classes</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="Component.prototype.providers"></a> <strong class="code-arg-name"> providers </strong> </td> <td class="code-arg-types"> <code><a href="#ProviderMap">ProviderMap</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>A map of name/class pairs for binding providers</p> </p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name="Component.prototype.servers"></a> <strong class="code-arg-name"> servers </strong> </td> <td class="code-arg-types"> <code>undefined | anonymous</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported optional </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>A map of name/class pairs for servers</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="ProviderMap"></a> <h3 class="code-ref">Interface: ProviderMap</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>A map of name/class pairs for binding providers</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="mountComponent"></a> <h3 class="code-ref">Function: mountComponent</h3> <section class="code-doc "> <a name="mountComponent"></a> <h4 class="code-ref">mountComponent(app: <a href="#Application">Application</a>, component: <a href="#Component">Component</a>) : void</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Mount a component to an Application.</p> </p> <p></p> </div> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Parameters</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> app </strong> </td> <td class="code-arg-types"> <code><a href="#Application">Application</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> <tr class="code-arg"> <td> <a name=""></a> <strong class="code-arg-name"> component </strong> </td> <td class="code-arg-types"> <code><a href="#Component">Component</a></code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p></p> <p></p> </div> </td> </tr> </table> </section> </section> <section class="code-doc "> <a name="CoreBindings"></a> <h3 class="code-ref">Namespace: CoreBindings</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Namespace for core binding keys</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.APPLICATION_CONFIG"></a> <h3 class="code-ref">const CoreBindings.APPLICATION_CONFIG = BindingKey.create<object>( 'application.config', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for application configuration</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.APPLICATION_INSTANCE"></a> <h3 class="code-ref">const CoreBindings.APPLICATION_INSTANCE = BindingKey.create<Application>( 'application.instance', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for application instance itself</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.CONTROLLER_CLASS"></a> <h3 class="code-ref">const CoreBindings.CONTROLLER_CLASS = BindingKey.create<ControllerClass>( 'controller.current.ctor', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for the controller class resolved in the current request context</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.CONTROLLER_CURRENT"></a> <h3 class="code-ref">const CoreBindings.CONTROLLER_CURRENT = BindingKey.create('controller.current')</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for the controller instance resolved in the current request context</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.CONTROLLER_METHOD_META"></a> <h3 class="code-ref">const CoreBindings.CONTROLLER_METHOD_META = "controller.method.meta"</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for the controller method metadata resolved in the current request context</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.CONTROLLER_METHOD_NAME"></a> <h3 class="code-ref">const CoreBindings.CONTROLLER_METHOD_NAME = BindingKey.create<string>( 'controller.current.operation', )</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for the controller method resolved in the current request context</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="CoreBindings.SERVERS"></a> <h3 class="code-ref">const CoreBindings.SERVERS = "servers"</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Binding key for servers</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="Server"></a> <h3 class="code-ref">Interface: Server</h3> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Defines the requirements to implement a Server for LoopBack applications: start() : Promise<void> stop() : Promise<void> It is recommended that each Server implementation creates its own child Context, which inherits from the parent Application context. This way, any Server-specific bindings will remain local to the Server instance, and will avoid polluting its parent module scope.</p> </p> <p></p> </div> </section> <section class="code-doc"> <!-- A table of members such as parameters/properties/variables --> <div class="code-arguments-hdr">Properties</div> <table class="params code-arguments"> <tr> <th class="hdr-name">Name</th> <th class="hdr-type">Type</th> <th class="hdr-default-value">Default Value</th> <th class="hdr-flags">Flags</th> <th class="hdr-desc">Description</th> </tr> <tr class="code-arg"> <td> <a name="Server.prototype.listening"></a> <strong class="code-arg-name"> listening </strong> </td> <td class="code-arg-types"> <code>boolean</code> </td> <td class="code-arg-default-value"> </td> <td class="code-arg-flags"> exported </td> <td class="code-arg-desc"> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Tells whether the server is listening for connections or not</p> </p> <p></p> </div> </td> </tr> </table> </section> <section class="code-doc "> <a name="Server.prototype.start"></a> <h4 class="code-ref">start() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Start the server</p> </p> <p></p> </div> </section> <section class="code-doc "> <a name="Server.prototype.stop"></a> <h4 class="code-ref">stop() : <a href="#Promise">Promise</a>&lt;void&gt;</h4> <!-- Used for displaying comments in Class, Interface, Properties Constructor, Function and Parameters of constructor or function. (Excludes Type alias). --> <div class="code-desc"> <p><p>Stop the server</p> </p> <p></p> </div> </section> </div> <div class="intentionally-left-blank"></div> </div> </div> <script src="js/vendor/jquery-1.10.1.min.js"></script> <script src="js/vendor/jquery.scrollTo-1.4.3.1.js"></script> <script src="js/vendor/bootstrap.min.js"></script> <script src="js/main.js"></script> </body> </html>