13  Cloud Hosting

Author
Affiliation

Dr Randy Johnson

Hood College

Published

February 26, 2025

Acknowledgements

Most of what we’ll discuss today stemmed from a Posit lesson on sharing Shiny apps. Gemini Code Assist was also active during the development of these materials, and some text was generated with its assistance.

Sharing Shiny Apps

  • Now that we have a Shiny app, how do we share it?

  • The Posit team has developed a number of avenues to share Shiny apps

    • Sharing R scripts
    • Hosting a webpage

Sharing R scripts

  • Obviously, anyone with access to our codebase can start up our Shiny app
  • There area few other ways to share our app without users needed to download and run the app
    • runURL
    • runGitHub
    • runGist

runURL

shiny::runUrl will handle the downloading and running of the app from a weblink to a zip file (‘.zip’, ‘.gz’, ‘.tar.gz’) containing our code:

shiny::runUrl("https://github.com/BIFX547-26/ShinyHood/raw/refs/heads/main/ShinyHood.zip")

runGitHub

When given a GitHub repository for a shiny app, shiny::runGitHub will download the relevant files from the provided GitHub repo and run a local copy of the app.

shiny::runGitHub("BIFX547-26/ShinyHood")

runGist

The same thing can be done with a GitHub Gist.

shiny::runGist("055fc0c7273b7ae8f932b1313b57cd2e")

Hosting a webpage

  • The free tier on Posit Connect supports
    • 20 hours a month
    • 4 GB of memory
    • 1 CPU
    • 5 Shiny apps / Unlimited documents