mirror of
https://gitee.com/johng/gf
synced 2026-06-26 17:35:40 +08:00
15 lines
315 B
Go
15 lines
315 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"gitee.com/johng/gf/g/net/ghttp"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
s := ghttp.GetServer()
|
||
|
|
s.BindHandler("/", func(r *ghttp.Request){
|
||
|
|
r.Response.Writeln("哈喽世界!")
|
||
|
|
})
|
||
|
|
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
|
||
|
|
s.SetPort(8199)
|
||
|
|
s.Run()
|
||
|
|
}
|