< Back
Start-PodeServer
Post
NAME Start-PodeServer
SYNOPSIS
Starts a Pode Server with the supplied ScriptBlock.
SYNTAX
Start-PodeServer [-ScriptBlock] <ScriptBlock> [[-Interval] <Int32>] [[-Name] <String>] [[-Threads] <Int32>]
[[-RootPath] <String>] [[-Request] <Object>] [[-Type] <String>] [-DisableTermination] [-Browse]
[<CommonParameters>]
DESCRIPTION
Starts a Pode Server with the supplied ScriptBlock.
PARAMETERS
-ScriptBlock <ScriptBlock>
The main logic for the Server.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Interval <Int32>
For 'Service' type Servers, will invoke the ScriptBlock every X seconds.
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
An optional name for the Server (intended for future ideas).
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Threads <Int32>
The numbers of threads to use for Web and TCP servers.
Required? false
Position? 4
Default value 1
Accept pipeline input? false
Accept wildcard characters? false
-RootPath <String>
An override for the Server's root path.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Request <Object>
Intended for Serverless environments, this is Requests details that Pode can parse and use.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Type <String>
The server type, to define how Pode should run and deal with incoming Requests.
Required? false
Position? 7
Default value [string]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-DisableTermination [<SwitchParameter>]
Disables the ability to terminate the Server.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Browse [<SwitchParameter>]
Open the web Server's default endpoint in your defualt browser.
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:\\>Start-PodeServer { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Start-PodeServer -Interval 10 { /* logic */ }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Start-PodeServer -Request $LambdaInput -Type 'AwsLambda' { /* logic */ }
RELATED LINKS
SYNOPSIS
Starts a Pode Server with the supplied ScriptBlock.
SYNTAX
Start-PodeServer [-ScriptBlock] <ScriptBlock> [[-Interval] <Int32>] [[-Name] <String>] [[-Threads] <Int32>]
[[-RootPath] <String>] [[-Request] <Object>] [[-Type] <String>] [-DisableTermination] [-Browse]
[<CommonParameters>]
DESCRIPTION
Starts a Pode Server with the supplied ScriptBlock.
PARAMETERS
-ScriptBlock <ScriptBlock>
The main logic for the Server.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Interval <Int32>
For 'Service' type Servers, will invoke the ScriptBlock every X seconds.
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
An optional name for the Server (intended for future ideas).
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Threads <Int32>
The numbers of threads to use for Web and TCP servers.
Required? false
Position? 4
Default value 1
Accept pipeline input? false
Accept wildcard characters? false
-RootPath <String>
An override for the Server's root path.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Request <Object>
Intended for Serverless environments, this is Requests details that Pode can parse and use.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Type <String>
The server type, to define how Pode should run and deal with incoming Requests.
Required? false
Position? 7
Default value [string]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-DisableTermination [<SwitchParameter>]
Disables the ability to terminate the Server.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Browse [<SwitchParameter>]
Open the web Server's default endpoint in your defualt browser.
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:\\>Start-PodeServer { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Start-PodeServer -Interval 10 { /* logic */ }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Start-PodeServer -Request $LambdaInput -Type 'AwsLambda' { /* logic */ }
RELATED LINKS