UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

72 lines (37 loc) 1.44 kB
--- lang: en title: 'API docs: core.server' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core permalink: /doc/en/lb4/apidocs.core.server.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [Server](./core.server.md) ## Server interface 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. **Signature:** ```typescript export interface Server extends LifeCycleObserver ``` **Extends:** [LifeCycleObserver](./core.lifecycleobserver.md) ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> [listening](./core.server.listening.md) </td><td markdown="1"> `readonly` </td><td markdown="1"> boolean </td><td markdown="1"> Tells whether the server is listening for connections or not </td></tr> </tbody></table>