示例#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")
}
示例#2
0
文件: server.go 项目: bwinterton/eden
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")

}