Public holidays API (#212)

This commit is contained in:
Dominic Wong
2021-09-21 18:51:19 +01:00
committed by GitHub
parent 09b06bd66f
commit 33653f7698
29 changed files with 1816 additions and 7 deletions

25
holidays/main.go Normal file
View File

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