add lists

This commit is contained in:
Asim Aslam
2022-02-20 11:57:07 +00:00
parent ea95c4954d
commit 3104133e38
9 changed files with 1850 additions and 0 deletions

30
lists/main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"github.com/micro/micro/v3/service"
log "github.com/micro/micro/v3/service/logger"
"github.com/micro/services/lists/handler"
pb "github.com/micro/services/lists/proto"
admin "github.com/micro/services/pkg/service/proto"
)
func main() {
// New Service
srv := service.New(
service.Name("lists"),
service.Version("latest"),
)
// Initialise service
srv.Init()
h := handler.New(srv.Client())
// Register Handler
pb.RegisterListsHandler(srv.Server(), h)
admin.RegisterAdminHandler(srv.Server(), h)
// Run service
if err := srv.Run(); err != nil {
log.Fatal(err)
}
}