mirror of
https://github.com/go-kratos/kratos.git
synced 2026-05-22 10:15:24 +02:00
@@ -15,11 +15,12 @@ func main() {
|
||||
router.HandleFunc("/home", func(w http.ResponseWriter, req *http.Request) {
|
||||
fmt.Fprint(w, "Hello Gorilla Mux!")
|
||||
}).Methods("GET")
|
||||
|
||||
httpSrv := transhttp.NewServer(transhttp.Address(":8000"))
|
||||
httpSrv.HandlePrefix("/", router)
|
||||
|
||||
app := kratos.New(
|
||||
kratos.Name("gin"),
|
||||
kratos.Name("mux"),
|
||||
kratos.Server(
|
||||
httpSrv,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user