10:00
If you have not done so already - go to shinyapps.io and sign up for an account.
You can create a new account via email & a password
or via OAuth through Google or GitHub.
If asked to pick a plan, use the Free option (more than sufficient for our needs here)
Or deploy your app directly from Posit Cloud… to Posit Cloud!
For deployment generally apps will be organized as a single folder that contains all the necessary components (R script(s), data files, other static content).
Pay attention to the nature of any paths used in your code
Absolute paths are almost certainly going to break
Relative paths should be to the root of the app folder
Static files (e.g. css, js, images, etc.) generally are placed in the www/
subfolder
Your script does not need to be named app.R
or ui.R
/server.R
Check / think about package dependencies
Now we will publish one of the demo apps to shinyapps.io (or posit.cloud)
Pick your favorite demo or exercise from today and package it up either as an app in exercises/ex08app
(you will need to create this folder)
data/weather.csv
) into this folderOpen the script file in exercises/ex06app
and click the Publish Document button in the upper right of the pane (look for the icon)
You should be presented with the “Publish to server”, click on the Add New Account link in the upper right
Select shinyapps.io and follow the instructions to connect
When retrieving your token for shinyapps.io you may need to click Dashboard
first and then your name (both in the upper right)
Once authenticated you should be back at the “Publish to server” dialog, use this to select which files to include (select your script and data file)
Your Shiny app should now be deploying and should open on shinyapps.io once live - check to see if everything works, if not go back and check Steps 1 and 3.
10:00
For other R users - you can share your script(s) and data directly
Run a local instance of shiny server
Use shinyapps.io (public) or posit.cloud (within team)
License Posit Connect
posit::conf 2023 - Getting Started with Shiny