How to find out (or specify) the localhost port used by R shiny (when running on the local computer)

I would like to know which R shiny port will use to display the application. I can see on some forums that the port should be 8100, but when I run the application, the selected posrt changes every time R restarts.

Can this port be specified? Or at least know the port that will be used, use it in another part of the script?

+4
source share
1 answer

There is a parameter port=that you can specify runApp. The default value NULLthat the random port selects. Read more on the help page ?runApp.

+5
source

Source: https://habr.com/ru/post/1545843/


All Articles