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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user