问题
I've made a .R file with a plumber code. The file works fine on my local pc, it works also fine on my linux server. My only problem now is, that it's only local.
I need to be able to get the API over the server adress. The server also runs a cronR process which makes all the math and a shiny-app to display some graphs. All the math is stored into an cvs file and plumber should now get the last index and display this so I can use it from everywhere.
Are there any solutions?
Code:
library(plumber)
path = "/srv/shiny-server/Crypto10/data/"
r = plumb(paste(path,"API.R", sep = ""))
r$run(port=8000)
回答1:
try
r$run(host="0.0.0.0",port=8000)
来源:https://stackoverflow.com/questions/47218743/r-plumber-on-linux-server