Beispiel #1
0
func main() {
	r := eden.New()

	r.Use(middleware.LogRequest)
	r.Use(jsonMiddleware)

	r.GET("/status", status)
	r.GET("/echo/:phrase", echo)

	r.Run(":80")
}
Beispiel #2
0
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")

}