1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-29 21:57:16 +02:00
longxboy eb958b2093
add path for rpc stub (#947)
* add path for rpc stub

* fix http body and response_body

Co-authored-by: chenzhihui <zhihui_chen@foxmail.com>
2021-05-26 14:23:43 +08:00
..
2021-04-12 21:37:16 +08:00
2021-05-26 14:23:43 +08:00
2021-04-12 21:37:16 +08:00
2021-04-12 21:37:16 +08:00
2021-04-12 21:37:16 +08:00

Run the examples

gin

1、Compile and execute the server code:

$ go run gin/main.go

2、From a different terminal, access the api to see the output:

$ curl http://127.0.0.1:8000/home
Hello Gin!

mux

1、Compile and execute the server code:

$ go run mux/main.go

2、From a different terminal, access the api to see the output:

$ curl http://127.0.0.1:8000/home
Hello Gorilla Mux!

static

1、Compile and execute the server code:

$ go run static/main.go

2、Access the following url with your browser:

http://127.0.0.1:8000/assets