Skip to content
Snippets Groups Projects
Commit 7af81375 authored by gjahn's avatar gjahn
Browse files

Allow to set version via environment variable

The version is displayed on the HTML-based landing page.
parent 497c5afc
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,8 @@ const BODY_SIZE_LIMIT = 32 * 1024 * 1024 // 32 MB, in bytes ...@@ -12,6 +12,8 @@ const BODY_SIZE_LIMIT = 32 * 1024 * 1024 // 32 MB, in bytes
type Config struct { type Config struct {
Version string `env:"VERSION" envDefault:"N/A"`
Environment string `env:"ENV_NAME" envDefault:"development"` Environment string `env:"ENV_NAME" envDefault:"development"`
Host string `env:"HOST" envDefault:"127.0.0.1"` Host string `env:"HOST" envDefault:"127.0.0.1"`
Port int16 `env:"PORT" envDefault:"3000"` Port int16 `env:"PORT" envDefault:"3000"`
......
...@@ -34,7 +34,7 @@ func SetRoutes( router *f.App, config *configuration.Config, store state.Store, ...@@ -34,7 +34,7 @@ func SetRoutes( router *f.App, config *configuration.Config, store state.Store,
} }
data := indexHtmlData{ data := indexHtmlData{
Version: "", Version: config.Version,
Color: "", Color: "",
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment