Easiest way to call localhost API? I just want to print a label

The end goal is to print labels from Retool Mobil App

I found this on github and I happen to have supported printers.

C# & compiling is foreign but feels manageable.

I don't yet know how to make retool mobile call localhost:60024/api/printers

After some search, I found 3 route, none seems that straight forward with my knowledge so far. Because the goal is just to print some labels, I'm really trying keep the time investment proportional.

  1. Self host retool in docker and do some docker.internal bridge. I know 1% of docker & its lingo, so this feels a lot of work for a very small function

  2. Use ngrok, I tried to have a read, there's so much jargon that doesn't even feel like English.

  3. Use localtunnel. While simple, it seems more for testing rather than running a service ongoing. Personally I'm not that confident maintaining a webservice purely in CLI

I'm hoping get some directions, or which would be relatively easier to setup and maintain.

In an ideal world, I was imagine some thing like a DDNS services that you simply create an account and fill in some URL

Hi @rxunique

ngrok is the most straightforward.

Once installed, you just need to run in a shell the command ngrok http 60024 (port has to match with your local server) and it'll provide you a remote URL (i.e. https://a7f7-151-60-70-63.ngrok-free.app) then, replace localhost:60024 with the remote one provided in your Retool app. That's it.

Hope this help

1 Like

Thanks. Guess I'll have to learn a few new words, I haven't seen so much foreign lingo for a while

ngrok works great. Simple to install and use.

The free version changes the URL every time you start a new session. We added a text input that's only visible when tunneling is needed so that we can update it on the fly rather than having to edit a variable in the app.

1 Like