mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
23 lines
403 B
Go
23 lines
403 B
Go
package main
|
|
|
|
import (
|
|
"github.com/micro/micro/v3/service"
|
|
"github.com/micro/micro/v3/service/logger"
|
|
|
|
"github.com/micro/services/notes/handler"
|
|
pb "github.com/micro/services/notes/proto"
|
|
)
|
|
|
|
func main() {
|
|
srv := service.New(
|
|
service.Name("notes"),
|
|
service.Version("latest"),
|
|
)
|
|
|
|
pb.RegisterNotesHandler(srv.Server(), handler.New())
|
|
|
|
if err := srv.Run(); err != nil {
|
|
logger.Fatal(err)
|
|
}
|
|
}
|