Add user API endpoints and metrics endpoint

This commit is contained in:
Kevin Kandlbinder 2022-03-01 14:08:53 +01:00
parent c572bbce85
commit ff7339d88f
10 changed files with 299 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import (
"github.com/Unkn0wnCat/matrix-veles/internal/web/api"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/viper"
"log"
"net/http"
@ -20,6 +21,8 @@ func StartServer() {
r.Use(middleware.Logger)
r.Handle("/metrics", promhttp.Handler())
r.HandleFunc("/", HomeHandler)
//r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("./static"))))