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.
21 lines
338 B
Smarty
21 lines
338 B
Smarty
1 year ago
|
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
|
||
|
conf.MustLoad(*configFile, &c)
|
||
|
gw := gateway.MustNewServer(c)
|
||
|
defer gw.Stop()
|
||
|
gw.Start()
|
||
|
}
|