jpsider / RestPS

Simple ReST Framework for Powershell
MIT License
114 stars 30 forks source link

Relative pathing for rest routes #31

Closed grumpy-admin99 closed 2 years ago

grumpy-admin99 commented 4 years ago

It would be good to not have to provide abolute pathing for ps scripts. I was thinking something along the lines of: in the start-RestPSListener use the RestPSLocalRoot param then: function Invoke-RequestRouter{ param (... [Parameter(Mandatory = $false)][String]$RestPSLocalRoot = $PSScriptRoot ...) Set-Location $RestPSLocalRoot

this will allow relative path in the ps calls - eg: "RequestCommand": "./Invoke-GetRoutes.ps1"

jpsider commented 4 years ago

I'm not opposed to this. Have you tested it locally?

grumpy-admin99 commented 4 years ago

yes I have - working beautifully so far.

jpsider commented 4 years ago

would you be willing to submit a PR for it?