Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rstudio Shiny how can I display the version of the Shiny server in the Shiny page?

Is there a variable or way of querying a running RStudio Shiny webpage to display the version of the server that is running? E.g. display something like shiny-0.10.1 on the webpage.

Any ideas?

like image 412
719016 Avatar asked Sep 23 '14 10:09

719016


People also ask

What is the server in R Shiny?

Shiny Server is an open source back end program that makes a big difference. It builds a web server specifically designed to host Shiny apps. With Shiny Server you can host your apps in a controlled environment, like inside your organization, so your Shiny app (and whatever data it needs) will never leave your control.

What is ui and server in R Shiny?

Shiny applications have two components, a user interface object and a server function, that are passed as arguments to the shinyApp function that creates a Shiny app object from this UI/server pair.

Which function is used to add a Shiny server component in R?

R file will be simple — it will source the UI and server files and create the Shiny application using shinyApp() . You'll need to install and load the shiny package. Second, you will need to source the UI and server files.


1 Answers

You can get the version of shiny that is running using packageVersion:

> packageVersion("shiny")
[1] ‘0.10.1’

If you want details on the server you can do a system call:

> system('shiny-server --version', intern = TRUE)
[1] "Shiny Server v1.1.0.10000" "Node.js v0.10.21" 

or if you are running shiny server pro there is a heath check endpoint so calling

http://my-shiny-ip-address/__health-check__

would return a http response with server info if the server is online like:

server-version: 1.2.3.4
active-connections: 8
active-apps: 2
active-processes: 3
cpu-percent: 13
memory-percent: 49
swap-percent: 39.1
load-average: 1.01953125

see http://rstudio.github.io/shiny-server/latest/#monitoring-the-server

like image 180
jdharrison Avatar answered Sep 28 '22 12:09

jdharrison