Full Example
Root Fields
port
- Type:
number - Default:
8787
storage
- Type:
object - Default: omitted
endpoints
- Type:
EndpointConfig[] - Required: yes
storage
storage.dir
- Type:
string - Default:
.wsignal
storage.file
- Type:
string - Default:
events.jsonl
logFile.
storage.rotate
- Type:
object
storage.rotate.maxSizeMb
- Type:
number - Default:
10
storage.rotate.maxFiles
- Type:
number - Default:
20
EndpointConfig
name
- Type:
string - Required: yes
path
- Type:
string - Required: yes
method
- Type:
string | string[] - Default:
POST
logFile
- Type:
string - Default: inherit
storage.file
storage.dir.
response
- Type:
EndpointResponseConfig
forward
- Type:
EndpointForwardConfig | EndpointForwardConfig[]
proxy
- Type:
EndpointProxyConfig
wsignal returns the upstream response to the original caller instead of the static response.
EndpointResponseConfig
status
- Type:
number - Default:
200
headers
- Type:
Record<string, string> - Default:
{}
json
- Type:
unknown
text.
text
- Type:
string
json.
EndpointForwardConfig
name
- Type:
string
url
- Type:
string - Required: yes
method
- Type:
string - Default: original request method
headers
- Type:
Record<string, string> - Default:
{}
when
- Type:
EndpointForwardMatchConfig
EndpointForwardMatchConfig
headers
- Type:
Record<string, string | string[]>
query
- Type:
Record<string, string | string[]>
EndpointProxyConfig
url
- Type:
string - Required: yes
method
- Type:
string - Default: original request method
headers
- Type:
Record<string, string> - Default:
{}