Settings
Project-wide configuration lives in settings.rat. It uses the same dialect as any other file: a > server-style block of key/value pairs, plus optional > database blocks. Settings are reloaded on every change, with no restart required.
Common fields
settings.rat
Most projects need only a few fields. port and host control the dev server bind; title and description feed into the rendered <head>; default_route redirects bare / to a real landing page.
# settings.rat
port: 1445
host: '127.0.0.1'
title: 'My Rat Site'
description: 'Small, fast, opinionated.'
default_route: '/home' Build modes
[] / [] section flags
Prefix a section header with [] or [] to keep it only when that mode is active. The active mode comes from the RAT_MODE env var (default dev). Use it for dev-only logging, prod-only API keys, or anywhere the value should differ across environments.
# settings.rat
port: 1445
> [@dev] server
hot_reload: true
log_level: 'debug'
> [@prod] server
hot_reload: false
log_level: 'warn' Database in settings
Declare the primary database here
Many projects put their primary database directly in settings.rat. The block accepts the same fields as a standalone data/-declared database. See Databases for the field list.
# settings.rat
> database
provider: 'sqlite'
url: 'file:./dev.db'
auto_migrate: true See also Hot reload · Databases · CLI