1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Cleanup and move template

This commit is contained in:
Asim
2015-05-25 18:16:42 +01:00
parent 94dee7a459
commit 5516f7ea1f
14 changed files with 78 additions and 145 deletions

30
examples/server/main.go Normal file
View File

@ -0,0 +1,30 @@
package main
import (
log "github.com/golang/glog"
"github.com/myodc/go-micro/cmd"
"github.com/myodc/go-micro/examples/server/handler"
"github.com/myodc/go-micro/server"
)
func main() {
// optionally setup command line usage
cmd.Init()
server.Name = "go.micro.srv.example"
// Initialise Server
server.Init()
// Register Handlers
server.Register(
server.NewReceiver(
new(handler.Example),
),
)
// Run server
if err := server.Run(); err != nil {
log.Fatal(err)
}
}