mirror of
https://github.com/skidoodle/spotify-ws
synced 2025-10-09 05:22:43 +02:00
refactor
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
module healthcheck
|
||||
|
||||
go 1.24.0
|
||||
@@ -1,24 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
resp, err := http.Get("http://localhost:3000/health")
|
||||
if err != nil {
|
||||
log.Fatalf("Error performing health check: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
log.Printf("Health check failed: Status code %d", resp.StatusCode)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Println("OK")
|
||||
os.Exit(0)
|
||||
}
|
||||
Reference in New Issue
Block a user