member_gateway_rpc/server/server.go

24 lines
458 B
Go
Raw Normal View History

2018-04-06 13:01:28 +00:00
package server
import (
2018-04-09 13:37:03 +00:00
csgw "git.loafle.net/commons/server-go/socket/web"
2018-04-10 06:03:15 +00:00
"git.loafle.net/overflow/member_gateway_rpc/config"
2018-04-06 13:01:28 +00:00
"git.loafle.net/overflow/member_gateway_rpc/servlet"
)
2018-04-10 06:03:15 +00:00
func New(_config *config.Config) *csgw.Server {
2018-04-09 13:37:03 +00:00
ws := &servlet.WebappServlets{}
2018-04-10 06:03:15 +00:00
sh := &ServerHandlers{
ServerHandlers: *_config.ServerHandler,
Config: _config,
}
2018-04-09 13:37:03 +00:00
sh.RegisterServlet("/webapp", ws)
2018-04-06 13:01:28 +00:00
2018-04-09 13:37:03 +00:00
s := &csgw.Server{
2018-04-06 13:01:28 +00:00
ServerHandler: sh,
}
return s
}