mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
17 lines
325 B
Go
17 lines
325 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
s.BindHandler("/", func(r *ghttp.Request) {
|
|
g.View().SetPath(`D:\Workspace\Go\GOPATH\src\gitee.com\johng\gf\geg\os\gview`)
|
|
b, _ := g.View().Parse("gview.tpl", nil)
|
|
r.Response.Write(b)
|
|
})
|
|
s.Run()
|
|
}
|