UNPKG

@loopback/docs

Version:

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

54 lines (38 loc) 2.66 kB
--- lang: en title: 'API docs: express.expressserver' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/express permalink: /doc/en/lb4/apidocs.express.expressserver.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [ExpressServer](./express.expressserver.md) ## ExpressServer class An Express server that provides middleware composition and injection <b>Signature:</b> ```typescript export declare class ExpressServer extends BaseMiddlewareRegistry implements Server ``` <b>Extends:</b> [BaseMiddlewareRegistry](./express.basemiddlewareregistry.md) <b>Implements:</b> [Server](./core.server.md) ## Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [(constructor)(config, parent)](./express.expressserver._constructor_.md) | | Constructs a new instance of the <code>ExpressServer</code> class | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [basePath](./express.expressserver.basepath.md) | | string | Base path to mount middleware | | [config?](./express.expressserver.config.md) | | [ExpressServerConfig](./express.expressserverconfig.md) \| undefined | <i>(Optional)</i> | | [expressApp](./express.expressserver.expressapp.md) | | express.Application | Embedded Express application | | [httpServer](./express.expressserver.httpserver.md) | | [HttpServer](./http-server.httpserver.md) | HTTP/HTTPS server | | [listening](./express.expressserver.listening.md) | | boolean | Some of the methods below are copied from RestServer TODO(rfeng): We might want to refactor some methods from RestServer into the base ExpressServer. | | [rootUrl](./express.expressserver.rooturl.md) | | string \| undefined | The root url for the server without the basePath. For example, the value will be 'http://localhost:3000' regardless of the <code>basePath</code>. | | [url](./express.expressserver.url.md) | | string \| undefined | The base url for the server, including the basePath if set. For example, the value will be 'http://localhost:3000/api' if <code>basePath</code> is set to '/api'. | ## Methods | Method | Modifiers | Description | | --- | --- | --- | | [getMiddlewareContext(request)](./express.expressserver.getmiddlewarecontext.md) | | Retrieve the middleware context from the request | | [start()](./express.expressserver.start.md) | | | | [stop()](./express.expressserver.stop.md) | | |