mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-10 21:52:01 +02:00
experimental codec branch
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
log "github.com/golang/glog"
|
||||
"github.com/micro/go-micro/cmd"
|
||||
"github.com/micro/go-micro/codec/bson"
|
||||
"github.com/micro/go-micro/examples/server/handler"
|
||||
"github.com/micro/go-micro/examples/server/subscriber"
|
||||
"github.com/micro/go-micro/server"
|
||||
@@ -12,11 +13,16 @@ func main() {
|
||||
// optionally setup command line usage
|
||||
cmd.Init()
|
||||
|
||||
server.DefaultServer = server.NewServer(
|
||||
server.Codec("application/bson", bson.Codec),
|
||||
)
|
||||
|
||||
// Initialise Server
|
||||
server.Init(
|
||||
server.Name("go.micro.srv.example"),
|
||||
)
|
||||
|
||||
|
||||
// Register Handlers
|
||||
server.Handle(
|
||||
server.NewHandler(
|
||||
|
Reference in New Issue
Block a user