mirror of
https://gitee.com/johng/gf
synced 2026-06-30 11:05:11 +08:00
23 lines
398 B
Go
23 lines
398 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
group := s.Group("/api")
|
|
group.ALL("/all", func(r *ghttp.Request) {
|
|
r.Response.Write("all")
|
|
})
|
|
group.GET("/get", func(r *ghttp.Request) {
|
|
r.Response.Write("get")
|
|
})
|
|
group.POST("/post", func(r *ghttp.Request) {
|
|
r.Response.Write("post")
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|