< Back
Add-PodeStaticRoute
Post
NAME Add-PodeStaticRoute
SYNOPSIS
Add a static Route for rendering static content.
SYNTAX
Add-PodeStaticRoute [-Path] <String> [-Source] <String> [[-Protocol] <String>] [[-Endpoint] <String>]
[[-EndpointName] <String>] [[-Defaults] <String[]>] [-DownloadOnly] [<CommonParameters>]
DESCRIPTION
Add a static Route for rendering static content. You can also define default pages to display.
PARAMETERS
-Path <String>
The URI path for the static Route.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Source <String>
The literal, or relative, path to the directory that contains the static content.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Protocol <String>
The protocol this static Route should be bound against.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Endpoint <String>
The endpoint this static Route should be bound against.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EndpointName <String>
The EndpointName of an Endpoint to bind the static Route against.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Defaults <String[]>
An array of default pages to display, such as 'index.html'.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DownloadOnly [<SwitchParameter>]
When supplied, all static content on this Route will be attached as downloads - rather than rendered.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/assets' -Source './assets'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/assets' -Source './assets' -Defaults @('index.html')
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/installers' -Source './exes' -DownloadOnly
RELATED LINKS
SYNOPSIS
Add a static Route for rendering static content.
SYNTAX
Add-PodeStaticRoute [-Path] <String> [-Source] <String> [[-Protocol] <String>] [[-Endpoint] <String>]
[[-EndpointName] <String>] [[-Defaults] <String[]>] [-DownloadOnly] [<CommonParameters>]
DESCRIPTION
Add a static Route for rendering static content. You can also define default pages to display.
PARAMETERS
-Path <String>
The URI path for the static Route.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Source <String>
The literal, or relative, path to the directory that contains the static content.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Protocol <String>
The protocol this static Route should be bound against.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Endpoint <String>
The endpoint this static Route should be bound against.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EndpointName <String>
The EndpointName of an Endpoint to bind the static Route against.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Defaults <String[]>
An array of default pages to display, such as 'index.html'.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DownloadOnly [<SwitchParameter>]
When supplied, all static content on this Route will be attached as downloads - rather than rendered.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/assets' -Source './assets'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/assets' -Source './assets' -Defaults @('index.html')
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Add-PodeStaticRoute -Path '/installers' -Source './exes' -DownloadOnly
RELATED LINKS