Connect separate backend service to convex
Hi, I'm trying to connect e separate backend service to my Convex backend. I know Convex is supposed to run as a backend for my app, but I didn't find any good examples on how to run websockets on it and (if possible) I'm also not sure about it's performance compared to Bun websockets.
The reason I do this is to build a realtime transcription service. I want when the transcription ends to fill the convex backend with the resulted transcript, but I haven't found any resources on how to create a ConvexClient with admin priviledges.
I saw you can setAuth on the the convex client, but I expect that to be the user's auth token right?
``ts
import { ConvexHttpClient } from 'convex/browser';
....
const client = new ConvexHttpClient(config.deploymentUrl);
client.setAuth(userJwtToken);
...
In the typescript definition, I've seen that you also have setAuthAdmin, but that doesn't do anything yet. Maybe I'm missing something?
cc @Jamie@erquhart @Convex Bot
1 Reply
maybe the other way would be to create convex http actions, but that sounds like scratching my ear with the opposite hand
cc @ballingt in case you are more in tune with this