79614b2d07
- Updated multiple repository and service files to replace imports from "github.com/mlogclub/simple/web/params" with "cs-agent/internal/pkg/httpx/params". - Adjusted context handling in auth_service and ws_service to use gin.Context instead of iris.Context. - Ensured consistent usage of HTTP status responses across websocket handlers.
33 lines
603 B
Go
33 lines
603 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log/slog"
|
|
|
|
"cs-agent/internal/bootstrap"
|
|
"cs-agent/internal/pkg/config"
|
|
)
|
|
|
|
func main() {
|
|
configPath := flag.String("config", "config/config.yaml", "path to config file")
|
|
flag.Parse()
|
|
|
|
if err := bootstrap.Init(*configPath); err != nil {
|
|
slog.Error("bootstrap init failed", "error", err)
|
|
return
|
|
}
|
|
|
|
cfg := config.Current()
|
|
|
|
app, err := bootstrap.NewServer()
|
|
if err != nil {
|
|
slog.Error("bootstrap server failed", "error", err)
|
|
return
|
|
}
|
|
|
|
if err := app.Run(cfg.Server.Address()); err != nil {
|
|
slog.Error("start server failed", "error", err)
|
|
return
|
|
}
|
|
}
|