shinyAce editor + eval parse on shinyapps.io (allow users to run code on shinyapps.io)

If I'm creating an R Shiny app that is a code editor for R can I host it on shinyapps.io?

I would imagine that anything I ship with my code would be accessible such as any environment variables or config file arguments, the code itself, so I can't have any secrets. I'm curious if other things like my account information for shinyapps.io could be exposed, my account email, or my shinyapps.io tokens? Is this even allowed can we host an app that allows users to run arbitrary code on shinyapps.io or is it against some TOS?

This is an exaggerated example, but shinyAce, and some whitelisted calls to eval parse are part of an app I'd like to host.

Maybe you can (or should) evaluate the code provided by the user in a separate R process. E.g. via {callr}. Using callr:r_bg you could even run it async to unblock your shiny app. Furthermore, it allows you to terminate long running code.

1 Like