INNER CODE UNIT · Go
init
cryptag/cryptag · servers/keyserver/main.go:20
func init() {
if os.Getenv("DEBUG") == "1" {
Debug = true
}
}
func main() {
db := mustInitDB()
defer db.Close()
r := mux.NewRouter()
r.HandleFunc("/minilock/{email}", GetMinilockID(db)).Methods("GET")
r.HandleFunc("/minilock", PostMinilockID(db)).Methods("POST")
http.Handle("/", r)
listenAddr := ":8000"
if port := os.Getenv("PORT"); port != "" {