Sorry for the delay here. I believe what you are talking about is mixing up the roles of RStudio Server and Shiny Server.
RStudio Server allows you to interactively run R code and preview Shiny applications in your development environment. It typically listens on port 8787, but does not allow sharing arbitrary URLs with others (as they are within your "user" / dev space).
Shiny Server, on the other hand, is one method of "sharing" Shiny applications. Other methods include shinyapps.io, RStudio Connect, or running the Shiny application on a given port (as you show) and then generating the firewall / link to share yourself (i.e. localhost:5050).
Shiny Server is configured separately from RStudio Server and typically listens on a different port (3838 by default). As you mentioned, you can share "per user application directories" at a location like http://:3838/username/myapp
I hope that helps!