You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
589 B
Go

3 years ago
/**
* @Author: jager
* @Email: lhj168os@gmail.com
* @File: main
* @Date: 2021/10/15 3:24
* @package: server
* @Version: v1.0.0
*
* @Description:
*
*/
package main
import (
"github.com/gin-gonic/gin"
"github.com/jageros/hawox/flags"
"github.com/jageros/hawox/httpx"
3 years ago
"wechat/ws"
3 years ago
)
const appName = "wechat"
func main() {
ctx, wait := flags.Parse(appName)
defer wait()
httpx.InitializeHttpServer(ctx, func(engine *gin.Engine) {
r := engine.Group("ws")
ws.Init(ctx, r, flags.Source())
3 years ago
}, func(s *httpx.Server) {
s.Port = flags.Options.HttpPort
3 years ago
})
}