Finalizado servidor

This commit is contained in:
Luiz F Picolo 2024-06-05 21:06:40 -04:00
parent b5967b13ac
commit f916e8e988

View File

@ -1,4 +1,4 @@
import { Server, loadPackageDefinition } from "@grpc/grpc-js"; import { Server, ServerCredentials, loadPackageDefinition } from "@grpc/grpc-js";
import { loadSync } from "@grpc/proto-loader"; import { loadSync } from "@grpc/proto-loader";
// Ler as definições do protobuffer // Ler as definições do protobuffer
@ -17,4 +17,7 @@ grpcServer.addService(tasksProto.TaskService.service, {
} }
}) })
const serverAddress = '0.0.0.0:5050'; const serverAddress = '0.0.0.0:5050';
grpcServer.bindAsync(serverAddress, ServerCredentials.createInsecure(), () => {
console.log("Servidor está funcionando bem...")
})