---
lang: en
title: 'API docs: core.application.servers'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.application.servers.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [Application](./core.application.md) &gt; [servers](./core.application.servers.md)

## Application.servers() method

Bind an array of Server constructors to the Application's master context. Each server added in this way will automatically be named based on the class constructor name with the "servers." prefix.

**Signature:**

```typescript
servers<T extends Server>(ctors: Constructor<T>[]): Binding[];
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

ctors


</td><td>

[Constructor](./context.constructor.md)<!-- -->&lt;T&gt;\[\]


</td><td>

An array of Server constructors.


</td></tr>
</tbody></table>

**Returns:**

[Binding](./context.binding.md)<!-- -->\[\]

An array of bindings for the registered server classes

## Remarks

If you wish to control the binding keys for particular server instances, use the app.server function instead.

```ts
app.servers([
 RestServer,
 GRPCServer,
]);
// Creates a binding for "servers.RestServer" and a binding for
// "servers.GRPCServer";
```


