修改常见默认端口
This commit is contained in:
@@ -60,9 +60,9 @@ func Load() *Config {
|
||||
// OPEN_API_DEBUG 优先;未设置时 debug 模式默认开启
|
||||
debugOpen := getEnvBool("OPEN_API_DEBUG", mode == "debug" || mode == "")
|
||||
return &Config{
|
||||
Port: getEnv("PORT", "8080"),
|
||||
Port: getEnv("PORT", "18080"),
|
||||
JWTSecret: getEnv("JWT_SECRET", "affiliate-dash-dev-secret-change-me"),
|
||||
DatabaseURL: getEnv("DATABASE_URL", "postgres://affiliate:affiliate_dev_password@127.0.0.1:5432/affiliate_dash?sslmode=disable&TimeZone=Asia/Shanghai"),
|
||||
DatabaseURL: getEnv("DATABASE_URL", "postgres://affiliate:affiliate_dev_password@127.0.0.1:15432/affiliate_dash?sslmode=disable&TimeZone=Asia/Shanghai"),
|
||||
Mode: mode,
|
||||
DataEncryptionKey: getEnv("DATA_ENCRYPTION_KEY", getEnv("JWT_SECRET", "affiliate-dash-dev-secret-change-me")),
|
||||
OpenAPIKey: getEnv("OPEN_API_KEY", "sk_source_dev_key_change_me"),
|
||||
|
||||
@@ -23,7 +23,7 @@ func New(t testing.TB, _ ...interface{}) *gorm.DB {
|
||||
dsn = os.Getenv("DATABASE_URL")
|
||||
}
|
||||
if dsn == "" {
|
||||
dsn = "postgres://affiliate:affiliate_dev_password@127.0.0.1:5432/affiliate_dash?sslmode=disable"
|
||||
dsn = "postgres://affiliate:affiliate_dev_password@127.0.0.1:15432/affiliate_dash?sslmode=disable"
|
||||
}
|
||||
|
||||
cfg := &gorm.Config{Logger: logger.Default.LogMode(logger.Silent)}
|
||||
|
||||
Reference in New Issue
Block a user