func (serv *Server) HandleGetIndex(w http.ResponseWriter, r *http.Request) {
file, _ := os.Open("./www/static/index.html")
data, _ := ioutil.ReadAll(file)
templ := template.Must(template.New("page").Parse(string(data)))
err := templ.ExecuteTemplate(w, "page", serv)
if err != nil {
serv.lg.WithError(err).Error("template")
}
}
templ := template.Must(template.New("page").Parse(string(data)))
r.Route("/", func(r chi.Router) {
r.Get("/", serv.HandleGetIndex)
//r.Post("/{taskID}/{status}", serv.HandlePostTaskStatus)
})
logrus.Info("server has started")
http.ListenAndServe(":8080", r)