import { ModuleRpcProtocolClient } from "rpc_ts/lib/protocol/client";
import { NoctBotService } from "@shared/rpc/backend";
import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport";

export const rpcClient = ModuleRpcProtocolClient.getRpcClient(NoctBotService, {
    remoteAddress: `http://${process.env.NOCTBOT_ADDR}:${process.env.RPC_PORT}`,
    getGrpcWebTransport: NodeHttpTransport(),
});
