trpc-panel icon indicating copy to clipboard operation
trpc-panel copied to clipboard

add support for ngrok

Open YgorPerez opened this issue 2 years ago • 3 comments
trafficstars

This feature would be super useful because I can't use next auth without a TSL connection and the easiest way to do this in the dev environment in Next.js is with ngrok, it creates a reverse tunnel with the app and makes it available on the internet, so I'm not sure how someone would go about implementing this.

If anyone has any idea on how to do this, but doesn't have the time or put in the effort, point me to what I should do, and I would happily take a shot in implementing it.

YgorPerez avatar Mar 21 '23 07:03 YgorPerez

Does something like:

ngrok http 3000

and then updating the url to:

renderTrpcPanel(myTrpcRouter, { url: "https://myngrokdomain.com/api/trpc" });

work?

If that works, then allowing changing the url in the panel after starting it up or something could be one way to make it simpler since the ngrok domain can change

iway1 avatar Apr 07 '23 02:04 iway1

renderTrpcPanel(myTrpcRouter, { url: "https://myngrokdomain.com/api/trpc" });

work?

Thank you for the reply, Yeah, that works!

If that works, then allowing changing the url in the panel after starting it up or something could be one way to make it simpler since the ngrok domain can change

any idea on how to implement that?

YgorPerez avatar Apr 08 '23 00:04 YgorPerez

I know this is a little unrelated, but also related. Throwing this out there as an alternative to ngrok

khill-fbmc avatar Apr 26 '23 11:04 khill-fbmc