add mor example for package garray

This commit is contained in:
john
2020-06-04 17:55:43 +08:00
parent 6e2c0d8706
commit 899fcbf2da
4 changed files with 28 additions and 56 deletions

View File

@ -1,25 +0,0 @@
[database]
debug = true
link = "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
[redis]
default = "127.0.0.1:6379,0"
cache = "127.0.0.1:6379,1"
# Logger.
[logger]
Path = "/tmp/log/gf-app"
Level = "all"
Stdout = true
[viewer]
delimiters = ["${", "}"]
autoencode = true
[server]
Address = ":8800"
ServerRoot = "/Users/john/Downloads"
ServerAgent = "gf-app"
# LogPath = "./log/gf-app/server"

View File

@ -1,20 +0,0 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
)
func main() {
s := g.Server()
s.BindHandler("POST:/login", func(r *ghttp.Request) {
r.Response.Write("login handler")
})
s.Group("/", func(group *ghttp.RouterGroup) {
group.GET("/test", func(r *ghttp.Request) {
r.Response.Write("for authenticated handler testing")
})
})
s.SetPort(8199)
s.Run()
}

View File

@ -1,11 +0,0 @@
package main
import (
"github.com/gogf/gf/frame/g"
)
func main() {
s := g.Server()
s.SetIndexFolder(true)
s.Run()
}