feat: make invite link base URL configurable via APP_URL

Load environment variables from .env file using godotenv.
Defaults to https://demo.adriatica.io if APP_URL is not set.
This commit is contained in:
Ryan Hamamura
2026-02-04 07:02:52 -10:00
parent 20ed4807d9
commit 7faf94fa6d
7 changed files with 23 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ func SnakePlayerList(sg *snake.SnakeGame, mySlot int) h.H {
}
func SnakeInviteLink(gameID string) h.H {
fullURL := baseURL + "/snake/" + gameID
fullURL := getBaseURL() + "/snake/" + gameID
return h.Div(h.Class("mt-4 text-center"),
h.P(h.Text("Share this link to invite players:")),
h.Div(h.Class("bg-base-200 p-4 rounded-lg font-mono break-all my-2"),