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?
optional
apiPrefix:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:54
the prefix to be used if the command is configured as REST api endpoint according to the OpenAPI defintion needs to enableRestApiExpose
set to true
Default
/api
commandPayloadAsCloudEvent?
optional
commandPayloadAsCloudEvent:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:79
command invocations are wrapped in CloudEvent
Link
https://github.com/cloudevents/spec/tree/v1.0
Default
false
enableHttpCompression?
optional
enableHttpCompression:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:84
enable HTTP compression in web server
Default
true
enableRestApiExpose?
optional
enableRestApiExpose:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:61
expose commands as regular REST endpoints when they are configured as endpoints
Default
true
name?
optional
name:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:10
name of the bridge
Default
HttpEventBridge
pathPrefix?
optional
pathPrefix:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:46
the prefix to be used for exposing commands as endpoints expecting a event bus message
Default
purista
serve()
serve: (
options
) =>Server
|Http2Server
|Http2SecureServer
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:21
The serve function is depending on the runtime.
- Bun:
Bun.serve
- Node.js:
serve
function from additional package@hono/hono-node-server
- Deno:
serve
function 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?
optional
serverHost:string
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:32
Host of the server.
Default
127.0.0.1
serverPort?
optional
serverPort:number
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:39
Port of the server.
Default
8080
subscriptionPayloadAsCloudEvent?
optional
subscriptionPayloadAsCloudEvent:boolean
Defined in: base-http-bridge/src/HttpEventBridge/types/HttpEventBridgeConfig.ts:70
subscription invocations are wrapped in CloudEvent
Link
https://github.com/cloudevents/spec/tree/v1.0
Default
false