add the weather

This commit is contained in:
Asim Aslam
2021-06-21 14:45:53 +01:00
parent 59b0cc6ecb
commit c77fdbd424
13 changed files with 781 additions and 0 deletions

24
weather/main.go Normal file
View File

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