完善https示例,README updates

This commit is contained in:
John 2018-04-23 22:03:11 +08:00
parent da2bb36308
commit 6826bf9c11
5 changed files with 82 additions and 3 deletions

View File

@ -38,7 +38,6 @@ gf是一款模块化、松耦合、轻量级、高性能的Web开发框架。开
* [执行对象注册](http://gf.johng.cn/590882)
* [回调方法注册](http://gf.johng.cn/590883)
* [事件回调注册](http://gf.johng.cn/590884)
* [服务性能分析](http://gf.johng.cn/592298)
* [路由控制](http://gf.johng.cn/49437)
* [Cookie](http://gf.johng.cn/494372)
* [Session](http://gf.johng.cn/494373)
@ -66,7 +65,10 @@ gf是一款模块化、松耦合、轻量级、高性能的Web开发框架。开
* [ORM链式操作](http://gf.johng.cn/596224)
* [ORM方法操作](http://gf.johng.cn/596223)
* [ORM事务操作](http://gf.johng.cn/596225)
* [Redis客户端](http://gf.johng.cn/596344)
* [框架开发进阶](http://gf.johng.cn/598801)
* [HTTPS服务](http://gf.johng.cn/598802)
* [服务性能分析](http://gf.johng.cn/592298)
* [Redis客户端](http://gf.johng.cn/596344)
* [网络服务开发](http://gf.johng.cn/494648)
* [TCPServer](http://gf.johng.cn/494382)
* [UDPServer](http://gf.johng.cn/494383)

View File

@ -7,7 +7,7 @@ import (
func main() {
s := ghttp.GetServer()
s.BindHandler("/", func(r *ghttp.Request){
r.Response.Writeln("哈喽世界!")
r.Response.Writeln("来自于HTTPS的哈喽世界!")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetPort(8199)

View File

@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDzzCCAregAwIBAgIJAJYpWLkC2lEXMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNV
BAYTAkNIMRAwDgYDVQQIDAdTaUNodWFuMRAwDgYDVQQHDAdDaGVuZ2R1MRAwDgYD
VQQKDAdKb2huLmNuMQwwCgYDVQQLDANEZXYxDTALBgNVBAMMBEpvaG4xHDAaBgkq
hkiG9w0BCQEWDWpvaG5Aam9obmcuY24wHhcNMT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