mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
22
test/users/main.go
Normal file
22
test/users/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/micro/micro/v3/service"
|
||||
"github.com/micro/micro/v3/service/logger"
|
||||
"github.com/micro/services/test/users/handler"
|
||||
proto "github.com/micro/services/test/users/proto"
|
||||
)
|
||||
|
||||
func main() {
|
||||
service := service.New(
|
||||
service.Name("users"),
|
||||
)
|
||||
|
||||
service.Init()
|
||||
|
||||
proto.RegisterUsersHandler(service.Server(), handler.NewUsers())
|
||||
|
||||
if err := service.Run(); err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user