✨ feat(__main__.py): add optional static_files_dir parameter to setup_app function
The variable name static_files_dir was changed to improve semantics. It is now more clear that it is a directory path. An optional static_files_dir parameter was added to the setup_app function to allow for a directory path to be passed in. This allows for more flexibility in serving static files.
🐛 fix(__main__.py): fix static_files_dir variable name to improve semantics
This commit is contained in:
parent
b005f8d87c
commit
93c3f7a2a6
1 changed files with 2 additions and 2 deletions
|
|
@ -142,8 +142,8 @@ def serve(
|
|||
cache=cache,
|
||||
)
|
||||
# create path object if path is provided
|
||||
path = Path(path) if path else path
|
||||
app = setup_app(static_files_dir=path)
|
||||
static_files_dir: Optional[Path] = Path(path) if path else None
|
||||
app = setup_app(static_files_dir=static_files_dir)
|
||||
# check if port is being used
|
||||
if is_port_in_use(port, host):
|
||||
port = get_free_port(port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue