feat: 初始化平台总后台与核心API

This commit is contained in:
2026-07-26 18:06:14 +08:00
parent 44122809b1
commit 4382641e19
38 changed files with 1837 additions and 25 deletions

View File

@@ -0,0 +1,19 @@
// Package config 提供运行配置,不在代码或仓库中保存真实密钥。
package config
import "os"
// Config 是 API 进程的最小运行配置。
type Config struct {
DatabaseURL string
Port string
}
// Load 读取环境变量并提供适用于本地开发的端口默认值。
func Load() Config {
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
return Config{DatabaseURL: os.Getenv("DATABASE_URL"), Port: port}
}