add service

This commit is contained in:
2025-05-17 03:22:10 +07:00
parent 0e399d92eb
commit 8643af86ee
3 changed files with 84 additions and 22 deletions
+7 -1
View File
@@ -3,6 +3,7 @@ package main
import (
"context"
"evening_detective/internal/app"
"evening_detective/internal/services"
proto "evening_detective/proto"
"log"
"net"
@@ -23,7 +24,12 @@ func main() {
// Create a gRPC server object
s := grpc.NewServer()
// Attach the Greeter service to the server
proto.RegisterEveningDetectiveServer(s, app.NewServer())
proto.RegisterEveningDetectiveServer(
s,
app.NewServer(
services.NewServices(),
),
)
// Serve gRPC server
log.Println("Serving gRPC on 0.0.0.0:8080")
go func() {