move messages to mail (#56)

This commit is contained in:
Asim Aslam
2021-02-01 11:20:52 +00:00
committed by GitHub
parent 39c77b9aeb
commit 226a595590
10 changed files with 137 additions and 114 deletions

25
mail/main.go Normal file
View File

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