posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
147 stars 15 forks source link

Running multiple applications #59

Closed dmresearch15 closed 3 weeks ago

dmresearch15 commented 5 months ago

I’ve created two apps using: shinylive::export("demo1", "multiapp", subdir = "app1") shinylive::export("demo2", "multiapp", subdir = "app2")

I've included a PNG file displaying the directory structure. Moving forward, how can I execute app1 and app2 either by utilising httpuv::runStaticServer("???") or through a local server?

Capture

georgestagg commented 4 months ago

First, serve the app in the usual way:

httpuv::runStaticServer("multiapp")

Then, in the web browser, load the subdirectory for the app by appending it to the URL.

So, for example, if httpuv starts a server at http://127.0.0.1:7446, then the first app should load by visiting http://127.0.0.1:7446/app1 in your browser.