mirror of
https://gitee.com/johng/gf
synced 2026-07-05 21:32:17 +08:00
update project structure
This commit is contained in:
16
example/net/ghttp/server/https/https.go
Normal file
16
example/net/ghttp/server/https/https.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := ghttp.GetServer()
|
||||
s.BindHandler("/", func(r *ghttp.Request) {
|
||||
r.Response.Writeln("来自于HTTPS的:哈喽世界!")
|
||||
})
|
||||
s.EnableHTTPS("./server.crt", "./server.key")
|
||||
s.SetAccessLogEnabled(true)
|
||||
s.SetPort(8199)
|
||||
s.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user