Files
services/blog/posts/main.go
Asim Aslam 61fe9c169b One
2020-10-02 11:13:01 +01:00

26 lines
473 B
Go

package main
import (
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
"github.com/micro/services/blog/posts/handler"
tags "github.com/micro/services/blog/tags/proto"
)
func main() {
// Create the service
srv := service.New(
service.Name("posts"),
)
// Register Handler
srv.Handle(&handler.Posts{
Tags: tags.NewTagsService("tags", srv.Client()),
})
// Run service
if err := srv.Run(); err != nil {
logger.Fatal(err)
}
}