Skip to content

Commit

Permalink
Disable 33060 port for now
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeguy committed Feb 9, 2024
1 parent 32ea92a commit 608b4a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion run/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func gitCreateDatabase(name string) (bool, error) {
name = strings.Replace(name, "_00", "_", 1)

driverName := "mysql"
dataSourceName := fmt.Sprintf("root:%s@tcp(localhost:33060)/", beego.AppConfig.String("dbPass"))
dataSourceName := fmt.Sprintf("root:%s@tcp(localhost:3306)/", beego.AppConfig.String("dbPass"))
engine, err := xorm.NewEngine(driverName, dataSourceName)
if err != nil {
return false, err
Expand Down
2 changes: 1 addition & 1 deletion run/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestUpdatePort(t *testing.T) {
panic(err)
}

newContent := strings.Replace(string(content), "(localhost:3306)", "(localhost:33060)", -1)
newContent := strings.Replace(string(content), "(localhost:3306)", "(localhost:3306)", -1)

err = ioutil.WriteFile(path, []byte(newContent), info.Mode())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion run/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func updateAppConfFile(name string, i int) {
content := util.ReadStringFromPath(confPath)
content = strings.ReplaceAll(content, "httpport = 8000", fmt.Sprintf("httpport = %d", 30000+i))
content = strings.ReplaceAll(content, "123456", beego.AppConfig.String("dbPass"))
content = strings.ReplaceAll(content, "(localhost:3306)", "(localhost:33060)")
content = strings.ReplaceAll(content, "(localhost:3306)", "(localhost:3306)")
content = strings.ReplaceAll(content, "dbName = casdoor", fmt.Sprintf("dbName = %s", dbName))
content = strings.ReplaceAll(content, "redisEndpoint =", "redisEndpoint = \"localhost:6379\"")
content = strings.ReplaceAll(content, "socks5Proxy = \"127.0.0.1:10808\"", "socks5Proxy =")
Expand Down

0 comments on commit 608b4a2

Please sign in to comment.