mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-01 00:31:09 +00:00

This also allows arbitrary listening fd include UNIX domain sockets, via environment variables as sd_listen_fds(3).
54 lines
1.8 KiB
TOML
54 lines
1.8 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, or example values for commented lines.
|
|
|
|
[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
|
|
|
|
# Listener socket configuration. (Required)
|
|
# There must be exact one option under this section being set.
|
|
[listen]
|
|
# Listen on an address.
|
|
address = "localhost:8080"
|
|
|
|
# Use systemd socket activation mechanism to get listener fd from envvars.
|
|
# See also sd_listen_fds(3) and systemd.socket(5).
|
|
#systemd = true
|
|
|
|
[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
|