-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #681 from Badgerati/develop
v2.1.0
- Loading branch information
Showing
44 changed files
with
829 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ pode_modules/ | |
ps_modules/ | ||
docs/[Ff]unctions/ | ||
examples/state.json | ||
examples/issue-* | ||
pkg/ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM mcr.microsoft.com/powershell:7.0.1-ubuntu-16.04 | ||
FROM mcr.microsoft.com/powershell:7.1.1-ubuntu-18.04 | ||
LABEL maintainer="Matthew Kelly (Badgerati)" | ||
RUN mkdir -p /usr/local/share/powershell/Modules/Pode | ||
COPY ./pkg/ /usr/local/share/powershell/Modules/Pode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM badgerati/ps-core:7.0.1-arm32 | ||
FROM badgerati/ps-core:7.1.1-arm32 | ||
LABEL maintainer="Matthew Kelly (Badgerati)" | ||
RUN mkdir -p /usr/local/share/powershell/Modules/Pode | ||
COPY ./pkg/ /usr/local/share/powershell/Modules/Pode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
param ( | ||
[int] | ||
$Port = 8085 | ||
) | ||
|
||
$path = Split-Path -Parent -Path (Split-Path -Parent -Path $MyInvocation.MyCommand.Path) | ||
Import-Module "$($path)/src/Pode.psm1" -Force -ErrorAction Stop | ||
|
||
# or just: | ||
# Import-Module Pode | ||
|
||
# create a server, and start listening on port 8085 | ||
Start-PodeServer -Threads 2 { | ||
|
||
# listen on localhost:8085 | ||
Add-PodeEndpoint -Address * -Port 8090 -Protocol Http -Name '8090Address' | ||
Add-PodeEndpoint -Address * -Port $Port -Protocol Http -Name '8085Address' -RedirectTo '8090Address' | ||
|
||
# log errors to the terminal | ||
# New-PodeLoggingMethod -Terminal | Enable-PodeErrorLogging | ||
|
||
# set view engine to pode renderer | ||
Set-PodeViewEngine -Type Pode | ||
|
||
# GET request for web page on "localhost:8085/" | ||
Add-PodeRoute -Method Get -Path '/' -ScriptBlock { | ||
Write-PodeViewResponse -Path 'simple' -Data @{ 'numbers' = @(1, 2, 3); } | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.