Template updates (commit: 24e45d7)
All checks were successful
Push to GitHub / mirror (push) Successful in 4s
All checks were successful
Push to GitHub / mirror (push) Successful in 4s
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
app_name: Go Template Container Web Server
|
||||||
|
|
||||||
listen:
|
listen:
|
||||||
address: 0.0.0.0
|
address: 0.0.0.0
|
||||||
port: 80
|
port: 80
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
|
|
||||||
type WebServer struct {
|
type WebServer struct {
|
||||||
HTTPServer *http.Server
|
HTTPServer *http.Server
|
||||||
|
AppName string `yaml:"app_name"`
|
||||||
Listen WSListen `yaml:"listen"`
|
Listen WSListen `yaml:"listen"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ func (s *WebServer) Initialize() {
|
|||||||
Address: "0.0.0.0",
|
Address: "0.0.0.0",
|
||||||
Port: "80",
|
Port: "80",
|
||||||
}
|
}
|
||||||
|
s.AppName = "Go Template Container Web Server"
|
||||||
|
|
||||||
// Attempt to read the config file
|
// Attempt to read the config file
|
||||||
configFile, err := os.ReadFile("config.yml")
|
configFile, err := os.ReadFile("config.yml")
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func handleVersion(w http.ResponseWriter, r *http.Request) {
|
|||||||
// Return (write) the version to the response body
|
// Return (write) the version to the response body
|
||||||
tmpl.Execute(w, SiteInfo{
|
tmpl.Execute(w, SiteInfo{
|
||||||
CommitId: COMMIT_ID,
|
CommitId: COMMIT_ID,
|
||||||
Name: "YASKM",
|
Name: ws.AppName,
|
||||||
Version: APP_VERSION,
|
Version: APP_VERSION,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user