Skip to content

Commit

Permalink
accept app root path as kwarg to dash() method
Browse files Browse the repository at this point in the history
Allow the app root path to be specified explicitly for the `dash()` method. The default is `app_root_path()` and does not break compatibilty.

fixes: plotly#232
  • Loading branch information
tanmaykm committed Nov 30, 2023
1 parent 462b215 commit 1b9c074
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/dashapp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ If a parameter can be set by an environment variable, that is listed as:
Values provided here take precedence over environment variables.
# Arguments
- `app_root::String` - a path, usually the current working directory, relative to which other folders are determined. Auto detected by default.
- `assets_folder::String` - a path, relative to the current working directory,
for extra files to be used in the browser. Default `'assets'`. All .js and .css files will be loaded immediately unless excluded by `assets_ignore`, and other files such as images will be served if requested.
Expand Down Expand Up @@ -282,6 +283,7 @@ If a parameter can be set by an environment variable, that is listed as:
clientside callback.
"""
function dash(;
app_root = app_root_path(),
external_stylesheets = ExternalSrcType[],
external_scripts = ExternalSrcType[],
url_base_pathname = dash_env("url_base_pathname"),
Expand Down Expand Up @@ -327,6 +329,6 @@ function dash(;
compress,
update_title
)
result = DashApp(app_root_path(), isinteractive(), config, index_string)
result = DashApp(app_root, isinteractive(), config, index_string)
return result
end

0 comments on commit 1b9c074

Please sign in to comment.