From 68aaecae08062f6a200bc7167e8666c14165630c Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 6 Mar 2025 12:27:03 -0700 Subject: feat: remove standalone gRPC server --- magefile.go | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'magefile.go') diff --git a/magefile.go b/magefile.go index 0e309bdd..334f6586 100644 --- a/magefile.go +++ b/magefile.go @@ -56,15 +56,6 @@ func Api() error { return sh.RunWithV(env, "ruby", "./bin/api") } -// Run the gRPC Server -func Rpc() error { - env := map[string]string{ - "PORT": "50051", - "HOST": "localhost", - } - return sh.RunWithV(env, "ruby", "./bin/rpc") -} - // Open a web browser to the login page func Browser() error { url := "http://localhost:8080/ui/sessions/new" @@ -77,11 +68,9 @@ func Browser() error { // Generate gRPC from protocal buffers func Protos() error { - files := x.Must(filepath.Glob("./protos/*.proto")) outDir := "lib/authx/rpc" - for _, file := range files { - var err error - if err = sh.RunV( + for _, file := range x.Must(filepath.Glob("./protos/*.proto")) { + if err := sh.RunV( "protoc", "--proto_path=./protos", "--ruby_out="+outDir, @@ -90,15 +79,6 @@ func Protos() error { ); err != nil { return err } - if err = sh.RunV( - "grpc_tools_ruby_protoc", - "--proto_path=./protos", - "--ruby_out="+outDir, - "--grpc_out="+outDir, - file, - ); err != nil { - return err - } } return nil @@ -106,5 +86,5 @@ func Protos() error { // Run All the servers func Run(ctx context.Context) { - mg.CtxDeps(ctx, Idp, UI, Api, Rpc, Gateway) + mg.CtxDeps(ctx, Idp, UI, Api, Gateway) } -- cgit v1.2.3