feat(aws): support lambda (#334)

This commit is contained in:
Bo-Yi Wu
2018-01-23 16:34:34 +08:00
committed by GitHub
parent b0260af17b
commit d7ce3c077c
43 changed files with 2795 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
// +build lambda
package gorush
import (
"github.com/apex/gateway"
)
// RunHTTPServer provide run http or https protocol.
func RunHTTPServer() error {
if !PushConf.Core.Enabled {
LogAccess.Debug("httpd server is disabled.")
return nil
}
LogAccess.Debug("HTTPD server is running on " + PushConf.Core.Port + " port.")
return gateway.ListenAndServe(PushConf.Core.Address+":"+PushConf.Core.Port, routerEngine())
}
+1 -1
View File
@@ -1,4 +1,4 @@
// +build !windows
// +build !windows,!lambda
package gorush
+1 -1
View File
@@ -1,4 +1,4 @@
// +build windows
// +build windows,!lambda
package gorush