[feature/backend] implement /users handler + switch to username + add display name + user management cli
This commit is contained in:
parent
1d712d4e6c
commit
86ab334bc9
38 changed files with 1851 additions and 506 deletions
36
backend/config/config.yaml.example
Normal file
36
backend/config/config.yaml.example
Normal file
|
@ -0,0 +1,36 @@
|
|||
database:
|
||||
driver: sqlite3
|
||||
# SQLite DSN 说明:
|
||||
# - file:tss.db => 相对路径,在当前目录创建 tss.db
|
||||
# - cache=shared => 启用共享缓存,提高性能
|
||||
# - _fk=1 => 启用外键约束
|
||||
# - mode=rwc => 如果数据库不存在则创建(read-write-create)
|
||||
dsn: "file:tss.db?cache=shared&_fk=1&mode=rwc"
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
host: localhost
|
||||
|
||||
jwt:
|
||||
secret: your-jwt-secret-here # 在生产环境中应该使用环境变量
|
||||
expiration: 24h
|
||||
|
||||
storage:
|
||||
driver: local
|
||||
local:
|
||||
root: storage
|
||||
base_url: http://localhost:8080/storage
|
||||
|
||||
logging:
|
||||
level: debug
|
||||
format: console
|
||||
|
||||
rate_limit:
|
||||
enabled: true
|
||||
requests: 100
|
||||
duration: 1m
|
||||
|
||||
access_log:
|
||||
enabled: true
|
||||
format: combined
|
||||
output: stdout
|
Loading…
Add table
Add a link
Reference in a new issue