Files
ai-agent/cmd/server/main.go
T
mlogclub 101577f163 Refactor internal services to use agent-desk package structure
- Updated import paths in multiple service files to reflect the new agent-desk module.
- Added a new configuration file for agent-desk in the Docker setup.
2026-05-31 18:43:48 +08:00

33 lines
607 B
Go

package main
import (
"flag"
"log/slog"
"agent-desk/internal/bootstrap"
"agent-desk/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
}
}