File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ WORKDIR = $(PWD)
33
44# build CLI
55LOCAL_TAG := $(shell git describe --tags --abbrev=0)
6- LOCAL_BUILD := $(shell date +"% m-% d-% Y_% H_% M_% S")
7- LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG ) -X main.build=$(LOCAL_BUILD )
6+ LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG )
87
98# coverage
109COVERAGE_REPORT = coverage.txt
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ And it'll launch a `GraphiQL` server
9797``` bash
9898$ graphiql
9999
100- 2018/11/24 17:10:36 GraphiQL run on http://localhost:4040...
100+ 2018/11/24 17:10:36 GraphiQL run on http://localhost:4040/graphiql ...
1011012018/11/24 17:10:36 GraphQL endpoint http://localhost:8080/graphql
1021022018/11/24 17:10:36 Use (ctrl+c) to terminate the execution
103103```
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212var (
1313 name = "graphiql"
1414 version = "undefined"
15- build = "undefined "
15+ graphiqlEndpoint = "/graphiql "
1616)
1717
1818func main () {
@@ -24,12 +24,13 @@ func main() {
2424 flag .Parse ()
2525
2626 if * showVersion {
27- fmt .Printf ("%s%s\n " , name , version )
27+ fmt .Printf ("%s %s\n " , name , version )
2828 return
2929 }
3030
3131 if * showClientGraphiQLVersion {
3232 fmt .Println (graphiql .GraphiQLVersion )
33+ return
3334 }
3435
3536 run (* endpoint , * port )
@@ -41,10 +42,10 @@ func run(endpoint, port string) {
4142 panic (err )
4243 }
4344
44- http .Handle ("/graphiql" , graphiqlHandler )
45+ http .Handle (graphiqlEndpoint , graphiqlHandler )
4546 httpAddr := ":" + port
4647
47- log .Printf ("GraphiQL run on http://localhost%s...\n " , httpAddr )
48+ log .Printf ("GraphiQL run on http://localhost%s%s ...\n " , httpAddr , graphiqlEndpoint )
4849 log .Printf ("GraphQL endpoint %s\n " , endpoint )
4950 log .Printf ("Use (ctrl+c) to terminate the execution" )
5051
You can’t perform that action at this time.
0 commit comments