mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
18 lines
301 B
Go
18 lines
301 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
s.Group("/api.v2", func(group *ghttp.RouterGroup) {
|
|
group.ALL("/test", func(r *ghttp.Request) {
|
|
r.Response.Write(r.GetRequest("nickname"))
|
|
})
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|