github.com/jepp2078/gqlgen@v0.7.2/example/config/server/server.go (about) 1 package main 2 3 import ( 4 "log" 5 "net/http" 6 7 todo "github.com/99designs/gqlgen/example/config" 8 "github.com/99designs/gqlgen/handler" 9 ) 10 11 func main() { 12 http.Handle("/", handler.Playground("Todo", "/query")) 13 http.Handle("/query", handler.GraphQL( 14 todo.NewExecutableSchema(todo.New()), 15 )) 16 log.Fatal(http.ListenAndServe(":8081", nil)) 17 }