This commit is contained in:
2026-09-02 10:49:46 +05:30
parent 1e3fe88e87
commit c0d39e550d
8 changed files with 463 additions and 25 deletions

13
main.go
View File

@@ -255,8 +255,19 @@ func main() {
}
// Start server
//
// The port comes from APP_PORT, defaulting to the 1122 this has always
// served on. It was hardcoded, which left `config.Load()`'s Port field
// dead and the Dockerfile's `EXPOSE 1009` describing a port nothing
// listened on — and made running a second copy locally, on a free port,
// impossible without editing this line.
port := os.Getenv("APP_PORT")
if port == "" {
port = "1122"
}
go func() {
if err := app.Listen(":1122"); err != nil {
log.Printf("🚀 listening on :%s", port)
if err := app.Listen(":" + port); err != nil {
log.Fatal("Server failed to start:", err)
}
}()