This commit is contained in:
2021-01-05 09:43:50 +01:00
parent 6f42dafcb9
commit 76576053e2
2 changed files with 13 additions and 20 deletions

View File

@@ -71,7 +71,6 @@ func startServer() {
m := macaron.Classic()
m.Use(pongo2.Pongoer())
m.Use(macaron.Static("static"))
// m.Get("/", myHandler)
m.Get("/", statusPage)
m.Get("/outlets", outletsPage)
@@ -87,12 +86,6 @@ func startServer() {
m.Get("/json/status", jsonStatus)
m.Post("/json/outlet/:id/toggle", jsonOutletToggle)
m.Get("/boards", func(ctx *macaron.Context) {
ctx.HTML(200, "boards") // 200 is the response code.
})
logInfo("hostname: " + viper.GetString("system.hostname"))
logInfo("Web interface ready")
http.ListenAndServe("0.0.0.0:"+viper.GetString("system.listeningport"), m)
}