fixes
Server Deploy / deploy (push) Successful in 2m24s

This commit is contained in:
2026-07-27 15:59:45 +01:00
parent fdfe8e8e46
commit 66140aaf58
8 changed files with 97 additions and 14 deletions
+2 -2
View File
@@ -17,13 +17,13 @@ import (
func main() {
mongoURI := getEnv("MONGO_URI", "mongodb://localhost:27017")
dbName := getEnv("MONGO_DB", "vantage")
if os.Getenv("GRPC_HOST") == "" {
log.Fatal("GRPC_HOST is required (host:port agents dial for gRPC)")
}
if err := db.Connect(mongoURI, dbName); err != nil {
// DB name comes from the MONGO_URI path; "vantage" is the fallback.
if err := db.Connect(mongoURI, "vantage"); err != nil {
log.Fatalf("failed to connect to MongoDB: %v", err)
}
log.Println("connected to MongoDB")