feat(config): implement layered configuration using config.yaml and .env
This commit is contained in:
22
config.yaml
Normal file
22
config.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
# 服务器配置
|
||||
server:
|
||||
port: "3000"
|
||||
environment: "development"
|
||||
|
||||
# 数据库配置
|
||||
database:
|
||||
driver: "sqlite" # 可选: sqlite, postgres
|
||||
sqlite:
|
||||
path: "./data/database.sqlite"
|
||||
postgres:
|
||||
host: "localhost"
|
||||
port: "5432"
|
||||
user: "trace"
|
||||
password: "trace123"
|
||||
dbname: "trace"
|
||||
sslmode: "disable"
|
||||
|
||||
# JWT 配置
|
||||
jwt:
|
||||
secret: "your-secret-key-here-change-in-production"
|
||||
expire: 7200 # 过期时间(秒)
|
||||
Reference in New Issue
Block a user