---
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) &gt; [@loopback/rest](./rest.md) &gt; [RestServer](./rest.restserver.md) &gt; [(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). |


