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

Fix Shiny for Python not working for app_dir #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ shiny-server 1.5.20
then deploy the generated index.html, index_files directory, and the source
index.qmd together to be served by Shiny Server.

* Fix bug where Shiny for Python apps did not work for `app_dir` directives.

shiny-server 1.5.19
--------------------------------------------------------------------------------

Expand Down
6 changes: 5 additions & 1 deletion lib/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,15 @@ function SingleAppRouter(appdir, runas, prefix, logDir, settings) {
var app = _.find(files, function(entry) {
return /^server\.r$/i.test(entry);
});

var singleApp = _.find(files, function(entry) {
return /^app\.r$/i.test(entry);
});
var rmd = _.find(files, function(entry) {
return /\.[rq]md$/i.test(entry);
});
var pyApp = _.find(files, function(entry) {
return /^app\.py$/.test(entry);
});
var indexRmd = _.find(files, function(entry) {
if (/^index\.[rq]md$/i.test(entry)){
return entry;
Expand Down Expand Up @@ -296,6 +298,8 @@ function SingleAppRouter(appdir, runas, prefix, logDir, settings) {
.done();
return true;
}
} else if (pyApp) {
appSpec.settings.mode = "shiny-python";
} else{
// No app found.
}
Expand Down