Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow serving static assets in Shiny Express apps #1170

Merged
merged 6 commits into from
Mar 1, 2024
Merged

Conversation

wch
Copy link
Collaborator

@wch wch commented Mar 1, 2024

Closes #984. This PR does the following for Shiny Express apps:

  • Automatically serves a www subdirectory, mounting it at /
  • Adds a function express.app_opts(), which allows setting options that get passed to the App() constructor. This includes static_assets and debug.

And it adds this change for Shiny in general:

  • In the App() constructor, the static_assets are now sorted by their mount point, from longest string to shortest before actually mounting them. This because previously, if an app had mounts "/" and "/foo", specified in that order, it would never actually serve anything in the "/foo" mount because it would search the "/" mount first.

@wch wch merged commit 84f872b into main Mar 1, 2024
30 checks passed
@wch wch deleted the express-static-assets branch March 1, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Express mode should auto opt into using the www folder
2 participants