Page Contents

Home > @loopback/rest > RestApplication > requestHandler

RestApplication.requestHandler property

Handle incoming HTTP(S) request by invoking the corresponding Controller method via the configured Sequence.

Signature:

get requestHandler(): HttpRequestListener;

Example

const app = new RestApplication();
// setup controllers, etc.

const server = http.createServer(app.requestHandler);
server.listen(3000);