chore: fix lambda build for netlify (#587)
This commit is contained in:
@@ -4,6 +4,10 @@ package router
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/appleboy/gorush/config"
|
||||
"github.com/appleboy/gorush/logx"
|
||||
|
||||
"github.com/apex/gateway"
|
||||
)
|
||||
@@ -11,11 +15,11 @@ import (
|
||||
// RunHTTPServer provide run http or https protocol.
|
||||
func RunHTTPServer(ctx context.Context, cfg config.ConfYaml, s ...*http.Server) (err error) {
|
||||
if !cfg.Core.Enabled {
|
||||
LogAccess.Debug("httpd server is disabled.")
|
||||
logx.LogAccess.Debug("httpd server is disabled.")
|
||||
return nil
|
||||
}
|
||||
|
||||
LogAccess.Info("HTTPD server is running on " + cfg.Core.Port + " port.")
|
||||
logx.LogAccess.Info("HTTPD server is running on " + cfg.Core.Port + " port.")
|
||||
|
||||
return gateway.ListenAndServe(cfg.Core.Address+":"+cfg.Core.Port, routerEngine())
|
||||
return gateway.ListenAndServe(cfg.Core.Address+":"+cfg.Core.Port, routerEngine(cfg))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user