'Connect to RShiny app through phone by localhost

I'm developing an app that I will be used mainly on phones, so I need to connect to it through the localhost. Computer and phone are in the same WiFi. I have the app running locally, not in an Shiny server, just through Rstudio.

I have tried runApp(port = 8080) which, in the computer lets me access through the browser by localhost:8080, the app works.

However when I try to access in my phone the same I get a localhost refused to connect ERR_CONNECTION_REFUSED.

I have very little knowledge of networks, so that's why this is bugging me so much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source