Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 434 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 434 Bytes

Ctp Web Framework

Ctp is a web framework written in Go. Now , the purpose for this project is only to learn how to write a go http framework !

Example

func main() {
	engin := ctp.Default()
	engin.GET("foo", FooControllerHandler)
	server := &http.Server{
		Addr:    ":8000",
		Handler: engin,
	}
	server.ListenAndServe()

}

func FooControllerHandler(c *ctp.Context) {
	c.Json(200, "success")
}