diff options
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl')
-rw-r--r-- | vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl b/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl deleted file mode 100644 index fca71c53..00000000 --- a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl +++ /dev/null @@ -1,20 +0,0 @@ -{{ reserveImport "context" }} -{{ reserveImport "log" }} -{{ reserveImport "net/http" }} -{{ reserveImport "os" }} -{{ reserveImport "github.com/99designs/gqlgen/handler" }} - -const defaultPort = "8080" - -func main() { - port := os.Getenv("PORT") - if port == "" { - port = defaultPort - } - - http.Handle("/", handler.Playground("GraphQL playground", "/query")) - http.Handle("/query", handler.GraphQL({{ lookupImport .ExecPackageName }}.NewExecutableSchema({{ lookupImport .ExecPackageName}}.Config{Resolvers: &{{ lookupImport .ResolverPackageName}}.Resolver{}}))) - - log.Printf("connect to http://localhost:%s/ for GraphQL playground", port) - log.Fatal(http.ListenAndServe(":" + port, nil)) -} |