@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
65 lines (34 loc) • 1.13 kB
Markdown
---
lang: en
title: 'API docs: core.application.getserver'
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.getserver.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/core](./core.md) > [Application](./core.application.md) > [getServer](./core.application.getserver.md)
## Application.getServer() method
Retrieve the singleton instance for a bound server.
**Signature:**
```typescript
getServer<T extends Server>(target: Constructor<T> | string): Promise<T>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
target
</td><td markdown="1">
[Constructor](./context.constructor.md)<!-- --><T> \| string
</td><td markdown="1">
</td></tr>
</tbody></table>
**Returns:**
Promise<T>
A Promise of server instance