feat: bootstrap supply intelligence baseline
This commit is contained in:
31
cmd/supply-intelligence/main.go
Normal file
31
cmd/supply-intelligence/main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"supply-intelligence/internal/app"
|
||||
"supply-intelligence/internal/domain"
|
||||
)
|
||||
|
||||
func main() {
|
||||
application := app.New()
|
||||
application.Repo.UpsertRoutingState(domain.AccountRoutingState{
|
||||
AccountID: 1,
|
||||
Platform: "openai",
|
||||
AccountStatus: domain.AccountStatusActive,
|
||||
RoutingEnabled: true,
|
||||
RiskScore: 10,
|
||||
ReasonCode: "ok",
|
||||
LastProbeAt: time.Now().UTC(),
|
||||
Version: 1,
|
||||
})
|
||||
application.StartBackground(context.Background())
|
||||
defer application.StopBackground()
|
||||
log.Println("supply-intelligence listening on :8080")
|
||||
if err := http.ListenAndServe(":8080", application.Server.Routes()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user