mirror of
https://gitee.com/johng/gf
synced 2026-06-07 10:22:11 +08:00
18 lines
332 B
Go
18 lines
332 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.Writeln("来自于HTTPS的:哈喽世界!")
|
||
})
|
||
s.EnableHTTPS("./server.crt", "./server.key")
|
||
s.SetAccessLogEnabled(true)
|
||
s.SetPort(8199)
|
||
s.Run()
|
||
}
|