2023-06-05 09:56:55 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/conf"
|
|
|
|
"github.com/zeromicro/go-zero/gateway"
|
|
|
|
)
|
|
|
|
|
|
|
|
var configFile = flag.String("f", "etc/gateway.yaml", "config file")
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
var c gateway.GatewayConf
|
2023-09-19 03:41:38 +00:00
|
|
|
|
2023-07-12 02:22:03 +00:00
|
|
|
c.Timeout = int64(time.Second * 15)
|
2023-06-05 09:56:55 +00:00
|
|
|
gw := gateway.MustNewServer(c)
|
|
|
|
defer gw.Stop()
|
|
|
|
gw.Start()
|
|
|
|
}
|