Skip to content

Type Alias: HTTPServiceEntrypointOptions ​

HTTPServiceEntrypointOptions = object

The options of httpServiceEntrypoint.

Properties ​

host? ​

optional host?: string

The host or address the server listens on.

Default ​

ts
all the interfaces

limit? ​

optional limit?: number

The largest request body, in bytes; a larger one is answered with 413 and an error response.

Default ​

ts
10485760 (10 MiB)

listening? ​

optional listening?: (server) => void | Promise<void>

Run once the server listens, with the server (to read the port picked for port 0). A failure fails the entrypoint start.

Parameters ​

server ​

Server

Returns ​

void | Promise<void>


middlewares? ​

optional middlewares?: MiddlewareDefinition[]

The middlewares of this adapter's actions, run after the entrypoint's global middlewares.


name? ​

optional name?: string

The adapter name, to tell apart several service adapters of one entrypoint.


path? ​

optional path?: string

The path receiving the requests (POST). The event stream is served on events under it (/api → /api/events).

Default ​

ts
'/'

port? ​

optional port?: number

The port the server listens on; 0 picks a random free port. The entrypoint fails to start when the port is in use.

Default ​

ts
3000

Released under the MIT License.