You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/examples/http
包子 7b6332ee75
deps: middleware add separate go.mod and removes framework deps (#1385)
3 years ago
..
cors fix(examples/cors): method misuse (#1184) 3 years ago
echo style: add gosimple linter and gofmt linter (#1242) 3 years ago
errors fix(http): fix error encoder (#1141) 3 years ago
gin deps: middleware add separate go.mod and removes framework deps (#1385) 3 years ago
middlewares add router group for http server (#1208) 3 years ago
mux examples: clean examples (#1036) 3 years ago
static examples: clean examples (#1036) 3 years ago
upload examples: clean examples (#1036) 3 years ago
README.md Add README file for http & helloworld examples (#839) 4 years ago

README.md

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