Skip to content

Commit 04a683a

Browse files
feat: add ping endpoint for testing availability
1 parent 6670ca9 commit 04a683a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/server/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010

1111
func main() {
1212
r := mux.NewRouter()
13+
r.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
14+
_, _ = w.Write([]byte("pong"))
15+
}).Methods(http.MethodGet)
1316
r.HandleFunc("/auth", auth.HandleAuth).Methods(http.MethodPost)
1417

1518
log.Println("Listening on :8080")

0 commit comments

Comments
 (0)