UNPKG

634 BTypeScriptView Raw
1import { LifeCycleObserver } from './lifecycle';
2/**
3 * Defines the requirements to implement a Server for LoopBack applications:
4 * start() : Promise<void>
5 * stop() : Promise<void>
6 * It is recommended that each Server implementation creates its own child
7 * Context, which inherits from the parent Application context. This way,
8 * any Server-specific bindings will remain local to the Server instance,
9 * and will avoid polluting its parent module scope.
10 */
11export interface Server extends LifeCycleObserver {
12 /**
13 * Tells whether the server is listening for connections or not
14 */
15 readonly listening: boolean;
16}