Files
gf/geg/net/ghttp/server/https/https.go
2019-04-03 00:03:46 +08:00

16 lines
282 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()
}