22 lines
346 B
Smarty
22 lines
346 B
Smarty
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
|
|
|
|
c.Timeout = int64(time.Second * 15)
|
|
gw := gateway.MustNewServer(c)
|
|
defer gw.Stop()
|
|
gw.Start()
|
|
}
|