mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
* add notes * fix build * Commit from GitHub Actions (Publish APIs & Clients) Co-authored-by: asim <asim@users.noreply.github.com>
28 lines
504 B
Go
28 lines
504 B
Go
package main
|
|
|
|
import (
|
|
"github.com/micro/micro/v3/service"
|
|
log "github.com/micro/micro/v3/service/logger"
|
|
"github.com/micro/services/notes/handler"
|
|
pb "github.com/micro/services/notes/proto"
|
|
)
|
|
|
|
func main() {
|
|
// New Service
|
|
srv := service.New(
|
|
service.Name("notes"),
|
|
service.Version("latest"),
|
|
)
|
|
|
|
// Initialise service
|
|
srv.Init()
|
|
|
|
// Register Handler
|
|
pb.RegisterNotesHandler(srv.Server(), handler.New(srv.Client()))
|
|
|
|
// Run service
|
|
if err := srv.Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|