File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/easyCZ/grpc-web-hacker-news
3
3
go 1.17
4
4
5
5
require (
6
- github.com/go-chi/chi v1.5.4
6
+ github.com/go-chi/chi/v5 v5.0.7
7
7
github.com/golang/protobuf v1.5.2
8
8
github.com/improbable-eng/grpc-web v0.15.0
9
9
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
76
76
github.com/gin-contrib/sse v0.1.0 /go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI =
77
77
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14 =
78
78
github.com/gin-gonic/gin v1.6.3 /go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M =
79
- github.com/go-chi/chi v1.5.4 h1:QHdzF2szwjqVV4wmByUnTcsbIg7UGaQ0tPF2t5GcAIs =
80
- github.com/go-chi/chi v1.5.4 /go.mod h1:uaf8YgoFazUOkPBG7fxPftUylNumIev9awIWOENIuEg =
79
+ github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8 =
80
+ github.com/go-chi/chi/v5 v5.0.7 /go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8 =
81
81
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 /go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8 =
82
82
github.com/go-kit/kit v0.8.0 /go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as =
83
83
github.com/go-kit/kit v0.9.0 /go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as =
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "log"
5
+ "net/http"
6
+
4
7
"github.com/easyCZ/grpc-web-hacker-news/server/hackernews"
5
8
"github.com/easyCZ/grpc-web-hacker-news/server/middleware"
6
9
hackernews_pb "github.com/easyCZ/grpc-web-hacker-news/server/proto"
7
10
"github.com/easyCZ/grpc-web-hacker-news/server/proxy"
8
- "github.com/go-chi/chi"
9
- chiMiddleware "github.com/go-chi/chi/middleware"
11
+
12
+ "github.com/go-chi/chi/v5"
13
+ chiMiddleware "github.com/go-chi/chi/v5/middleware"
14
+
10
15
"github.com/improbable-eng/grpc-web/go/grpcweb"
11
16
"google.golang.org/grpc"
12
- "google.golang.org/grpc/grpclog"
13
- "net/http"
14
17
)
15
18
16
19
func main () {
@@ -32,7 +35,8 @@ func main() {
32
35
33
36
router .Get ("/article-proxy" , proxy .Article )
34
37
38
+ log .Println ("Serving API on http://127.0.0.1:8900" )
35
39
if err := http .ListenAndServe (":8900" , router ); err != nil {
36
- grpclog .Fatalf ("failed starting http2 server: %v" , err )
40
+ log .Fatalf ("failed starting http2 server: %v" , err )
37
41
}
38
42
}
You can’t perform that action at this time.
0 commit comments