Skip to content

Instantly share code, notes, and snippets.

@luisnquin
Created December 31, 2021 01:23
Show Gist options
  • Save luisnquin/31b1bee53a51c1c49fc51c0c81002d81 to your computer and use it in GitHub Desktop.
Save luisnquin/31b1bee53a51c1c49fc51c0c81002d81 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
"playground/auth"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/login", auth.Login)
mux.HandleFunc("/validate", auth.ValidateToken)
log.Println("Listening on http://127.0.0.1:8000")
http.ListenAndServe(":8000", mux)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment