-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Support for changing Server Root Path, both Literal and Relative #248
Comments
How about /routes to auto include .ps1 files. I do it like this:
|
That's a pretty neat idea for another feature - though it could be dangerous for people that already have a For this change, it's purely to help fix issues where the views/public/errors directories can't be found by Pode because the invocation path gets a little screwy - happens when starting the server within another function within another module, and the /views are one level deeper than the invocation path. |
Resolves #248 - Ability to alter a server's root path
This worked for me! The only strange thing is that the json file has to be in the same path as the script/module calling it. So my json file for pode is in my "public" function directory. Thanks for adding this! |
@jeremymcgee73 |
When Pode starts the server's root path is set the
$MyInvocation.PSScriptRoot
path, which defines the base path to the/views
,/public
and/errors
directories.Normally this is perfectly fine, but there are times when you need to alter the root path to your server because those directories above are located in a further subdirectory - or parent directory. Such a case could be when hosting your Pode server as a module, and the root path is set from the invocation of your module and not the Pode server.
pode.json
file - asserver.root
Join-Path
)The text was updated successfully, but these errors were encountered: