blahrs/blahd/config.example.toml

46 lines
1.4 KiB
TOML

# The example configuration file, required options are documented as
# `(Required)`, other options are optional and the example value given here is
# the default value.
[database]
# (Required)
# The path to the main SQLite database.
# The file will be created and initialized if not exist, but missing directory
# will not.
path = "/var/lib/blahd/db.sqlite"
# Whether to create and initialize the database if `path` does not exist.
# Note that parent directory will never be created and must already exist.
create = true
[server]
# (Required)
# The socket address to listen on.
listen = "localhost:8080"
# (Required)
# The global absolute URL prefix where this service is hosted.
# It is for link generation and must not have trailing slash.
base_url = "http://localhost:8080"
# Maximum number of items in a single response, eg. get chat items.
# More items will be paged.
max_page_len = 1024
# Maximum request body length in bytes.
max_request_len = 4096
# The maximum timestamp tolerance in seconds for request validation.
timestamp_tolerance_secs = 90
# The max waiting time for the first authentication message for websocket.
ws_auth_timeout_sec = 15
# The max waiting time for outgoing message to be received for websocket.
ws_send_timeout_sec = 15
# Maximum number of pending events a single user can have.
# If events overflow the pending buffer, older events will be dropped and
# client will be notified.
ws_event_queue_len = 1024