Release your app to the world π π
Before deploying, ensure that a single-file app is called app.R
and with multiple file apps, make sure that ui.R
and server.R
are present. A Shiny server will rely on these standardized file names in order to deploy properly.
PSRC related apps can be hosted in-house on our very own Shiny server. Apps currently deployed from the PSRC Shiny server can be found here (VPN required):
Before the Shiny server deploys your app:
Your app files must be on GitHub. Ideally your app project should be in its own GitHub repo, e.g.:
Learn some Bash commands to access and navigate the linux server. Hana, Craig, or Christy can help setup your app in the server, but itβs always good to know where your app lives and how to restart your app inside the Shiny server:
For personal, non-PSRC related projects, there is the option of shinyapps.io. RStudio can host your Shiny app. You can publish for free but there are limits to the number of apps that can be deployed, hours used, and resources.
After you first login, shinyapps.io provides instructions to deploy your first app. It will look similar to the code below:
In the console of the RStudio IDE:
rsconnect
package installed and loaded.install.packages('rsconnect')
library(rsconnect)
setAccountInfo(name=' ',
token=' ',
secret=' ')
You can find your account information on the front page of your shinyapps.io account before your first app is published or under Account > Tokens
deployApp(account = 'your_account_name', 'path/to/your/app')
If you have more than one account with shinyapps.io:
account
argument in deployApp()
.Tools > Global Options > Publishing
1.If you removed an app from your shinyapps.io account and are attempting to re-publish again, double check your local project folder and remove the rsconnect sub-folder if it exists.