@loopback/docs
Version:
Documentation for LoopBack 4
31 lines (20 loc) • 899 B
Markdown
lang: en
title: 'API docs: rest.restserver.(constructor)'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.restserver.(constructor).html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RestServer](./rest.restserver.md) > [(constructor)](./rest.restserver.(constructor).md)
## RestServer.(constructor)
Creates an instance of RestServer.
<b>Signature:</b>
```typescript
constructor(app: Application, config?: RestServerConfig);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| app | <code>Application</code> | The application instance (injected via CoreBindings.APPLICATION\_INSTANCE). |
| config | <code>RestServerConfig</code> | The configuration options (injected via RestBindings.CONFIG). |