diff --git a/config/config.go b/config/config.go index 60753eb..c690ce5 100755 --- a/config/config.go +++ b/config/config.go @@ -8,12 +8,12 @@ import ( ) var ( - Port string - StoreType string - StoreAddr string - StoreUser string - StorePass string - Public string + Port string + StoreType string + StoreAddr string + StoreUser string + StorePass string + MyTinyTodo string ) func init() { @@ -31,7 +31,7 @@ func Refresh() { as.Append(args.STRING, "storeaddr", "addr of store", "") as.Append(args.STRING, "storeuser", "user of store", "") as.Append(args.STRING, "storepass", "pass of store", "") - as.Append(args.STRING, "public", "url of php server", "http://localhost:38808") + as.Append(args.STRING, "mtt", "url of php server", "http://localhost:38808") if err := as.Parse(); err != nil { panic(err) } @@ -41,5 +41,5 @@ func Refresh() { StoreAddr = as.Get("storeaddr").GetString() StoreUser = as.Get("storeuser").GetString() StorePass = as.Get("storepass").GetString() - Public = as.Get("public").GetString() + MyTinyTodo = as.Get("mtt").GetString() } diff --git a/server/routes.go b/server/routes.go index fb7736c..f04741c 100755 --- a/server/routes.go +++ b/server/routes.go @@ -37,7 +37,7 @@ func (s *Server) Routes() error { } func (s *Server) index(w http.ResponseWriter, r *http.Request) { - f, err := os.Open(path.Join(config.Public, "index.php")) + f, err := os.Open(path.Join(config.MyTinyTodo, "index.php")) if err != nil { http.Error(w, err.Error(), http.StatusNotFound) return @@ -47,7 +47,7 @@ func (s *Server) index(w http.ResponseWriter, r *http.Request) { } func (s *Server) phpProxy(w http.ResponseWriter, r *http.Request) { - url, err := url.Parse(config.Public) + url, err := url.Parse(config.MyTinyTodo) if err != nil { log.Println(err) } else {