UNPKG

@loopback/docs

Version:
38 lines (24 loc) 952 B
--- lang: en title: 'API docs: rest.restserver._requesthandler' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.rest.restserver._requesthandler.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestServer](./rest.restserver.md) &gt; [\_requestHandler](./rest.restserver._requesthandler.md) ## RestServer.\_requestHandler property Handle incoming HTTP(S) request by invoking the corresponding Controller method via the configured Sequence. <b>Signature:</b> ```typescript protected _requestHandler: HttpRequestListener; ``` ## Example ```ts const app = new Application(); app.component(RestComponent); // setup controllers, etc. const restServer = await app.getServer(RestServer); const httpServer = http.createServer(restServer.requestHandler); httpServer.listen(3000); ```