feat(config): 添加配置管理模块和数据库连接功能
- 实现全局配置结构体,包含服务、数据库和日志配置 - 添加 Viper 配置加载功能,支持 YAML 文件和环境变量 - 创建 config.yaml 配置文件,包含服务器和数据库连接信息 - 集成 GORM 数据库连接功能,支持 PostgreSQL 驱动 - 更新依赖包,添加 postgres 驱动和相关工具库 - 实现 main 入口函数,加载配置并初始化服务 - 创建详细的 Phase 1 基础设施实施计划文档
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
server:
|
||||
port: 8080
|
||||
mode: debug
|
||||
|
||||
database:
|
||||
host: 175.178.9.76
|
||||
port: 25432
|
||||
dbname: postgres
|
||||
username: synoth
|
||||
password: uKWjf4ns5ahx
|
||||
sslmode: disable
|
||||
|
||||
log:
|
||||
level: debug
|
||||
Reference in New Issue
Block a user