1dfccf513a
- Initialize slog in the serve command with terminal/file support - Introduce `AppError` with HTTP status for unified service-layer errors - Replace ad-hoc `api.Error` calls with `api.RespondError` - Wrap internal errors with `model.NewInternalError` and add reference IDs - Add `RequestID` middleware and switch router from `gin.Default` to `gin.New`
34 lines
669 B
YAML
34 lines
669 B
YAML
server:
|
|
host: 0.0.0.0
|
|
port: 10086
|
|
|
|
database:
|
|
driver: sqlite3
|
|
sqlite:
|
|
path: data/mygo.db
|
|
postgres:
|
|
host: localhost
|
|
port: 5432
|
|
user: mygo
|
|
password: mygo
|
|
dbname: mygo
|
|
sslmode: disable
|
|
|
|
storage:
|
|
driver: local
|
|
local:
|
|
path: data/files
|
|
|
|
# Max upload file size in bytes. 0 = unlimited
|
|
max_upload_size: 104857600 # 100 MB
|
|
|
|
log:
|
|
level: info # terminal: debug, info, warn, error
|
|
file_path: "" # empty = no file logging
|
|
file_level: debug # file: debug, info, warn, error
|
|
|
|
jwt:
|
|
secret: change-me-in-production
|
|
access_ttl: 15m
|
|
refresh_ttl: 168h
|