@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
74 lines (38 loc) • 1.77 kB
Markdown
---
lang: en
title: 'API docs: http-server.basehttpoptions'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/http-server
permalink: /doc/en/lb4/apidocs.http-server.basehttpoptions.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/http-server](./http-server.md) > [BaseHttpOptions](./http-server.basehttpoptions.md)
## BaseHttpOptions interface
Base options that are common to http and https servers
**Signature:**
```typescript
export interface BaseHttpOptions extends ListenOptions, Partial<HttpServerProperties>
```
**Extends:** ListenOptions, Partial<[HttpServerProperties](./http-server.httpserverproperties.md)<!-- -->>
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
[gracePeriodForClose?](./http-server.basehttpoptions.graceperiodforclose.md)
</td><td markdown="1">
</td><td markdown="1">
number
</td><td markdown="1">
_(Optional)_ The `gracePeriodForClose` property controls how to stop the server gracefully. Its value is the number of milliseconds to wait before in-flight requests finish when the server is being stopped. With this setting, we also reject new requests from existing keep-alive connections in addition to stopping accepting new connections.
Defaults to Infinity (don't force-close). If you want to immediately destroy all sockets set its value to `0`<!-- -->.
See [stoppable](https://www.npmjs.com/package/stoppable)
</td></tr>
</tbody></table>