Skip to content

Instantly share code, notes, and snippets.

@cyantarek
Created February 6, 2019 12:51
Show Gist options
  • Save cyantarek/4ed49848bbc6a125948d930714376fd3 to your computer and use it in GitHub Desktop.
Save cyantarek/4ed49848bbc6a125948d930714376fd3 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
)
func main() {
http.HandleFunc("/protected", validateToken(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, I'm protected"))
}, srv))
log.Fatal(http.ListenAndServe(":9096", nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment