cant access trpc endpoints via the browser

AAyo11/7/2022
i'm converting some express endpoints to trpc, and I cant figure out how to access my endpoints via the browser for example http://localhost:3000/trpc/getbytenantid

my trpc endpoint

export const ticketServiceRouter = router({
  getByTenantId: ticketServiceProcedure.query(async () => {
    const repo = createRepo();
    const tenantId = '908e2d94-aef7-4ba6-a1a3-2ccec65a1d97';

    return await repo.get_by_tenant_id({ tenantId });
  }),
});

i get my data in the frontend no problem.

  const tickets = trpc.ticketService.getByTenantId.useQuery();


my express endpoint

export const create = (router: Router) => {
  const repo = createRepo();

  router.get('/tickets/get_by_tenant_id', async (req, res) => {
    // Mocked. Should be extracted from the JWT.
    const tenantId = '908e2d94-aef7-4ba6-a1a3-2ccec65a1d97';

    const result = await repo.get_by_tenant_id({ tenantId });

    res.json(result);
  });


express adapter

  app.use(
    '/getTenantById',
    trpcExpress.createExpressMiddleware({
      router: ticketServiceRouter,
      createContext,
    })
  );
UUUnknown User11/7/2022
Message Not Public
Sign In & Join Server To View
Kkumard311/8/2022
So with this can i access my trpc endpoints on different webisite by making and api request?
UUUnknown User11/8/2022
Message Not Public
Sign In & Join Server To View
Kkumard311/8/2022
that is what i want , thank you man , one more question do you have any example of trpc-openapi prisma example ?😅
UUUnknown User11/8/2022
Message Not Public
Sign In & Join Server To View