Skip to content

Commit

Permalink
test hello route
Browse files Browse the repository at this point in the history
  • Loading branch information
Firgrep committed Jun 2, 2024
1 parent 436ebfa commit c02071e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func main() {
/*
Define server routes
*/
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("Hello, World! From Caravan."))
})
http.HandleFunc("/read-object", func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "Only POST method is allowed", http.StatusMethodNotAllowed)
Expand Down

0 comments on commit c02071e

Please sign in to comment.