Skip to content

Commit 954ddb3

Browse files
committed
Fix: Resolve port conflict between API and visualization servers in Railway deployment
1 parent f540273 commit 954ddb3

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

cmd/main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,13 @@ func startVisualizationServer(neo4jRepo ports.Neo4jPort, cfg *models.Config) *ht
572572
http.ServeFile(w, r, filepath.Join(webRoot, "templates", "visualization.html"))
573573
})
574574

575-
vizPort := os.Getenv("PORT")
576-
if vizPort == "" {
577-
vizPort = "3000"
575+
576+
vizPort := "3000"
577+
if os.Getenv("RAILWAY_ENVIRONMENT") == "" {
578+
579+
if envPort := os.Getenv("VIZ_PORT"); envPort != "" {
580+
vizPort = envPort
581+
}
578582
}
579583
vizAddr := ":" + vizPort
580584

0 commit comments

Comments
 (0)