micro/template/main.go

31 lines
488 B
Go
Raw Normal View History

2015-01-14 02:31:27 +03:00
package main
import (
"github.com/asim/go-micro/cmd"
2015-01-14 02:31:27 +03:00
"github.com/asim/go-micro/server"
"github.com/asim/go-micro/template/handler"
2015-01-31 18:49:21 +03:00
log "github.com/golang/glog"
2015-01-14 02:31:27 +03:00
)
func main() {
// optionally setup command line usage
cmd.Init()
2015-01-14 02:31:27 +03:00
server.Name = "go.micro.service.template"
// Initialise Server
server.Init()
// Register Handlers
server.Register(
server.NewReceiver(
new(handler.Example),
),
)
// Run server
if err := server.Run(); err != nil {
log.Fatal(err)
}
}