mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
20 lines
350 B
Go
20 lines
350 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) {
|
|
r.Response.WriteTpl("layout.html", g.Map{
|
|
"header": "This is header",
|
|
"container": "This is container",
|
|
"footer": "This is footer",
|
|
})
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|