Select Git revision
server.go 453 B
// Package server implements the server.
package server
import (
"fmt"
"git.lyda.ie/kevin/boxes/api"
"github.com/labstack/echo/v4"
"github.com/spf13/cobra"
)
// StartServer starts the metrics and API servers.
func StartServer(_ *cobra.Command, _ []string) {
e := echo.New()
endpoints := NewEndpoints()
server := api.NewStrictHandler(endpoints, nil)
api.RegisterHandlers(e, server)
fmt.Printf("Server exited with: %+v\n", e.Start(":8070"))
}