PURISTA API / @purista/base-http-bridge / HttpEventBridgeConfig
Type Alias: HttpEventBridgeConfig
HttpEventBridgeConfig =
object
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:4
Properties
apiPrefix?
optionalapiPrefix?:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:49
the prefix to be used if the command is configured as REST api endpoint according to the OpenAPI definition needs to enableRestApiExpose set to true
Default
/apicommandPayloadAsCloudEvent?
optionalcommandPayloadAsCloudEvent?:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:74
command invocations are wrapped in CloudEvent
CloudEvents specification v1.0: https://github.com/cloudevents/spec/tree/v1.0
Default
falseenableHttpCompression?
optionalenableHttpCompression?:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:79
enable HTTP compression in web server
Default
trueenableRestApiExpose?
optionalenableRestApiExpose?:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:56
expose commands as regular REST endpoints when they are configured as endpoints
Default
truename?
optionalname?:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:5
pathPrefix?
optionalpathPrefix?:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:41
the prefix to be used for exposing commands as endpoints expecting a event bus message
Default
puristaserve
serve: (
options) =>Server|Http2Server|Http2SecureServer
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:16
The serve function is depending on the runtime.
- Bun:
Bun.serve - Node.js:
servefunction from additional package@hono/hono-node-server - Deno:
servefunction from packagehttps://deno.land/std/http/server.ts
Parameters
options
fetch
(request) => Promise<unknown> | unknown
hostname?
string
port?
number
Returns
Server | Http2Server | Http2SecureServer
See
serverHost?
optionalserverHost?:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:27
Host of the server.
Default
127.0.0.1serverPort?
optionalserverPort?:number
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:34
Port of the server.
Default
8080subscriptionPayloadAsCloudEvent?
optionalsubscriptionPayloadAsCloudEvent?:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:65
subscription invocations are wrapped in CloudEvent
CloudEvents specification v1.0: https://github.com/cloudevents/spec/tree/v1.0
Default
false