Skip to content

Commit

Permalink
Error handle and code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroksarker committed Sep 24, 2023
1 parent 17ecae8 commit 5c48e49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Binary file added cmd/api/api
Binary file not shown.
9 changes: 7 additions & 2 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package main

import (
"log"
"net/http"

"github.com/timam/statuz/cmd/watcher"
"github.com/timam/statuz/internal/healthz"
"net/http"
)

func main() {
watcher.Start()
err := watcher.Start()
if err != nil {
log.Fatalf("Error starting watcher: %v", err)
}

http.HandleFunc("/healthz", healthz.HealthCheck)
http.ListenAndServe(":8080", nil)
Expand Down

0 comments on commit 5c48e49

Please sign in to comment.