package main
import (
"golanglearn/web/framework/framework-context/gee"
)
func main() {
engine := gee.New()
engine.GET("/", func(c *gee.Context) {
c.HTML(200, "
hello
")
})
engine.GET("/hello", func(c *gee.Context) {
c.String(200, "hello,%v", c.Query("name"))
})
engine.POST("/login", func(c *gee.Context) {
//c.JSON(200, gee.H{
// "username": "xxxx",
// "password": "1234",
//})
c.JSON(200, gee.H{
"username": c.PostForm("username"),
"password": c.PostForm("password"),
})
})
_ = engine.Run(":9000")
}