mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 17:45:17 +03:00
refactor: init log
This commit is contained in:
@@ -1,25 +1,4 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"github.com/lorsanstand/HomeOps-Hub/api/gen/homeops"
|
||||
grpcserver "github.com/lorsanstand/HomeOps-Hub/internal/hub/grpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
func main() {
|
||||
lis, err := net.Listen("tcp", ":6756")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
grpcServer := grpc.NewServer()
|
||||
|
||||
srv := &grpcserver.Server{}
|
||||
homeops.RegisterHubServer(grpcServer, srv)
|
||||
|
||||
log.Println("Start serve")
|
||||
grpcServer.Serve(lis)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user