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

719016 picture 719016 · Sep 23, 2014 · Viewed 9.1k times · Source

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?

Answer

jdharrison picture jdharrison · Sep 23, 2014

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