feat: show commit hash in index route

only works on coolify or if you specify the SOURCE_COMMIT environment
variable manually
This commit is contained in:
trafficlunar 2025-07-20 16:28:20 +01:00
parent af790e5765
commit 02740548de

View file

@ -57,6 +57,7 @@ func NewRouter() {
json.NewEncoder(w).Encode(map[string]string{
"name": "trafficlunar's api",
"url": "https://github.com/trafficlunar/api",
"commit": os.Getenv("SOURCE_COMMIT")[:7], // shorten to 7 characters
})
})
r.Get("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {