Browse Source

config: 兼容多环境

Yi 1 year ago
parent
commit
44e1a139c6
2 changed files with 3 additions and 4 deletions
  1. 2 2
      conf/app-develop.ini
  2. 1 2
      conf/setting/setting.go

+ 2 - 2
conf/app-develop.ini

@@ -41,8 +41,8 @@ Description = tmrgo
 [database]
 Type = mysql
 User = root
-Password = 123456
-Host = 192.168.1.96:3306
+Password = root
+Host = 192.168.1.93:3326
 Name = tmrwatch3
 TablePrefix =
 

+ 1 - 2
conf/setting/setting.go

@@ -104,13 +104,12 @@ type Yyn struct {
 
 func Setup() {
 	var err error
-	workDir := os.Getenv("GO_WORK_DIR")
+	workDir := os.Getenv("GO_WORK_DIR_TMR")
 	if workDir == "" {
 		CurrentPath, err = GetCurrentPath()
 	} else {
 		CurrentPath = workDir
 	}
-
 	appEnv = strings.ToLower(os.Getenv("APP_ENVIRONMENT"))
 	switch appEnv {
 	case "test":