mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
16 lines
282 B
Go
16 lines
282 B
Go
package main
|
||
|
||
import (
|
||
"github.com/gogf/gf/g/net/ghttp"
|
||
)
|
||
|
||
func main() {
|
||
s := ghttp.GetServer()
|
||
s.BindHandler("/", func(r *ghttp.Request) {
|
||
r.Response.Writeln("来自于HTTPS的:哈喽世界!")
|
||
})
|
||
s.EnableHTTPS("./server.crt", "./server.key")
|
||
s.SetPort(8199)
|
||
s.Run()
|
||
}
|