mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 23:15:06 +00:00
move messages to mail (#56)
This commit is contained in:
25
mail/main.go
Normal file
25
mail/main.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user