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

Implement Enhancing Flexibility with Customizable Default Folder Path #1265

Merged
merged 4 commits into from
Mar 31, 2024
Merged

Conversation

mdaneri
Copy link
Contributor

@mdaneri mdaneri commented Mar 25, 2024

Implementation Details for #1243

Configuration via server.psd1:
Users can define custom paths for the default folders within the server.psd1 configuration file. This approach maintains Pode's configuration-driven design and ensures ease of setup. For example:

@{
    Server = @{
        DefaultFolders = @{
            Public = 'c:\custom\public'
            Views  = 'd:\shared\views'
            Errors = 'e:\logs\errors'
        }
    }
}

New PowerShell Functions:
To support this feature dynamically, we propose adding two new functions:

Set-PodeDefaultFolder: Allows users to programmatically set the path for a default folder during runtime.

Parameters:
-Type: Specifies the folder type (Views, Public, or Errors).
-Path : Defines the new file system path for the folder.

Get-PodeDefaultFolder: Enables querying the current path settings for the default folders.

…s in Pode #1243

Set-PodeDefaultFolder: Allows users to programmatically set the path for a default folder during runtime.

Parameters:
-Type: Specifies the folder type (Views, Public, or Errors).
-Path: Defines the new file system path for the folder.

Get-PodeDefaultFolder: Enables querying the current path settings for the default folders.
@mdaneri mdaneri changed the title Implement Enhancing Flexibility with Customizable Default Folder Path #1243 Implement Enhancing Flexibility with Customizable Default Folder Path Mar 25, 2024
@Badgerati Badgerati linked an issue Mar 30, 2024 that may be closed by this pull request
@Badgerati Badgerati added this to the 2.10.0 milestone Mar 30, 2024
src/Private/Context.ps1 Outdated Show resolved Hide resolved
Copy link
Owner

@Badgerati Badgerati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Badgerati Badgerati merged commit e462867 into Badgerati:develop Mar 31, 2024
11 checks passed
@mdaneri mdaneri deleted the #1243 branch April 1, 2024 00:18
@Badgerati Badgerati mentioned this pull request Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancing Flexibility with Customizable Default Folder Paths in Pode
2 participants