func main() { r := eden.New() r.Use(middleware.LogRequest) r.Use(jsonMiddleware) r.GET("/status", status) r.GET("/echo/:phrase", echo) r.Run(":80") }
func main() { r := eden.New() r.Use(middleware.LogRequest) r.GET("/hello", func(c *eden.Context) { c.Respond(200, eden.DefaultResponse{Status: "OK", Data: "Hello World!"}) }) r.Run(":8080") }