blahrs/blahd/config.example.toml
oxalica c5263c607c Split out socket config and switch back to toml crate
basic-toml does not support externally-tagged enum yet.

See: https://github.com/dtolnay/basic-toml/issues/8
2024-09-10 01:29:21 -04:00

49 lines
1.6 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]
# If enabled, a in-memory non-persistent database is used instead. Options
# `path` and `create` are ignored. This should only be used for testing.
in_memory = false
# 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
[listen]
# (Required)
# The local address to listen on.
address = "localhost:8080"
[server]
# (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