Jakob Borg 12 лет назад
Родитель
Сommit
0ceddc4fa3
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      gui.go

+ 5 - 0
gui.go

@@ -15,6 +15,7 @@ import (
 
 func startGUI(addr string, m *Model) {
 	router := martini.NewRouter()
+	router.Get("/", getRoot)
 	router.Get("/rest/version", restGetVersion)
 	router.Get("/rest/model", restGetModel)
 	router.Get("/rest/connections", restGetConnections)
@@ -31,6 +32,10 @@ func startGUI(addr string, m *Model) {
 	}()
 }
 
+func getRoot(w http.ResponseWriter, r *http.Request) {
+	http.Redirect(w, r, "/index.html", 302)
+}
+
 func restGetVersion() string {
 	return Version
 }