Skip to content

Commit a423b85

Browse files
Move environment variable docs from README to TypeScript definitions (#1236)
* Initial plan * Move environment variable docs from README to TypeScript definitions Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
1 parent edcd266 commit a423b85

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ We aren't in the NPM registry but you can easily install it with the NPM client:
1818

1919
![Untitled](https://github.com/user-attachments/assets/c887f49f-5e7a-446e-970d-f66b4d03cf4a)
2020

21-
### :gear: Environment variables
22-
23-
| Variable | Description | Default |
24-
|---|---|---|
25-
| `UWS_HTTP_MAX_HEADERS_SIZE` | Maximum total byte size of HTTP request headers (runtime env variable). | `4096` |
26-
| `UWS_HTTP_MAX_HEADERS_COUNT` | Maximum number of HTTP request headers (compile-time define, not a runtime env variable). | `100` |
27-
2821
### :handshake: Permissively licensed
2922
Intellectual property, all rights reserved.
3023

‎docs/index.d.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,15 @@ export var DEDICATED_DECOMPRESSOR_1KB: CompressOptions;
441441
export var DEDICATED_DECOMPRESSOR_512B: CompressOptions;
442442
/** Sliding dedicated decompress window, requires 32KB of memory per socket (plus about 23KB) */
443443
export var DEDICATED_DECOMPRESSOR: CompressOptions;
444+
445+
/**
446+
* Environment variables recognized by uWebSockets.js.
447+
*
448+
* These can be set in the process environment before starting the server.
449+
*/
450+
export namespace EnvironmentVariables {
451+
/** Maximum total byte size of HTTP request headers. This is a runtime env variable. Default: 4096. */
452+
declare const UWS_HTTP_MAX_HEADERS_SIZE: string | undefined;
453+
/** Maximum number of HTTP request headers. This is a compile-time define, not a runtime env variable. Default: 100. */
454+
declare const UWS_HTTP_MAX_HEADERS_COUNT: string | undefined;
455+
}

0 commit comments

Comments
 (0)