Skip to content

Commit

Permalink
Add hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
Divkix committed Mar 6, 2023
1 parent 9c282d3 commit 986c4da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ func indexHandler(w http.ResponseWriter, req bunrouter.Request) error {
// return a JSON response with the status and uptime, truncated to seconds
return bunrouter.JSON(w,
bunrouter.H{
"status": "alive",
"uptime": time.Since(start).Truncate(time.Second).String(),
"status": "alive",
"uptime": time.Since(start).Truncate(time.Second).String(),
"hostname": os.Getenv("HOSTNAME"),
},
)
}

0 comments on commit 986c4da

Please sign in to comment.