通过 host参数设置的值表示接受任何连接(而不仅仅是来自 localhost)。port参数可以假定您想要的任何值(只需确保避免选择其他服务(如 ssh或 http)使用的端口)。然后,注意你的本地 IP (如果你在 linux 下,你可以通过 ifconfig看到它)。假设你的 IP 地址是 192.168.1.70。你的同事可以通过在浏览器 192.168.1.70:5050的地址栏中插入你的应用程序,也就是说,你的 IP 后面跟着 :和你选择的端口号。
如果你想从局域网外部访问,当有人通过5050端口连接到你的公共 IP 时,你可以将你的路由器指向你的电脑。
We also looked into pushing it up on a AWS server, opted for our own as the content is sensitive. Otherwise both solutions looked similar. The Linux and Shiny system are light, you might be able to run it on the free Amazon server!
Here's another really "hacky" solution. I recently had to deal with the same issue you faced, and wasn't sure how to get some sort of POC in front of the eyes of those who make the decisions. I knew that they could access a particular shared network drive. So I saved the R binaries to that network drive. The app that I wrote was saved on that same network drive. I then wrote a .R file and saved it in the app's working directory that had these lines in it to set the working directory and source the global variables.