Last active
December 29, 2020 17:49
-
-
Save nkreiger/3536a6b4be1e6e6e553e000a896310d9 to your computer and use it in GitHub Desktop.
initial main.go in init branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
// create anew http router | |
rtr := mux.NewRouter() | |
// health endpoint | |
rtr.HandleFunc("/health", services.Health).Methods(get) | |
// use go routinue to serve endpoint | |
ctx := context.Background() | |
GracefullyListenAndServe(ctx, addr, rtr) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment