This commit is contained in:
Dominic Wong
2021-09-20 11:15:52 +01:00
committed by GitHub
parent 0ab4b37981
commit 4319f7bf4c
14 changed files with 514 additions and 0 deletions

25
qr/main.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"github.com/micro/services/qr/handler"
pb "github.com/micro/services/qr/proto"
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
)
func main() {
// Create service
srv := service.New(
service.Name("qr"),
service.Version("latest"),
)
// Register handler
pb.RegisterQrHandler(srv.Server(), handler.New())
// Run service
if err := srv.Run(); err != nil {
logger.Fatal(err)
}
}