Files
sablier/cmd/start.go
Alexis Couvreur 00cc153d7a fix: add http error responses (#494)
This features adds rfc7807 Problem detail responses when an error happens processing a request.

This will greatly improve the common issues  with "blank pages" and "404 pages" issues which should now properly tell the user what input was wrong (group that does not exist, container name that does not exist, etc.)
2025-02-02 00:00:49 -05:00

23 lines
405 B
Go

package cmd
import (
"github.com/sablierapp/sablier/app"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var newStartCommand = func() *cobra.Command {
return &cobra.Command{
Use: "start",
Short: "Start the Sablier server",
Run: func(cmd *cobra.Command, args []string) {
viper.Unmarshal(&conf)
err := app.Start(cmd.Context(), conf)
if err != nil {
panic(err)
}
},
}
}