Skip to content
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

New method to return configuration from the pode.json file, plus improved docs #161

Closed
Badgerati opened this issue Jan 21, 2019 · 3 comments

Comments

@Badgerati
Copy link
Owner

Badgerati commented Jan 21, 2019

There is a pode.json config file that can be used - though only for static page defaults currently. This issue is to extend that, so that the config file can be used for custom things - like port numbers, hostnames, or other app settings the user so desires:

  • A new Get-PodeConfiguration function to return the contents of the pode.json file (if it exists)
  • The configuration is reloaded on an internal restart
  • Improved documentation for the pode.json file
  • Support for multi-environmental configs via a PODE_ENVIRONMENT env-var. So pode.dev.json if it's dev, or the default of pode.json for not set
@majkinetor
Copy link
Sponsor

Is this config stuff referenced by magic, some standard, function, little dwarfs or ... ?

What is the scope of this task ? Any custom data could be put there or just some you cherry picked as most important ?

@majkinetor
Copy link
Sponsor

Also, what about multiple enviromental configs ? Supporting stuff such as pode.[ENVIRONMENT.]json would be probably cool, where environment could be specified via env var.

@Badgerati
Copy link
Owner Author

At the moment it's loaded automatically when you start the server, and only looks for a pode.json at the root. There are key defined sections in there, for web/tcp/smtp/service (so the 4 server types) however, it's just basic JSON and loaded as such - so you can add anything else you want in there.

It's only accessible and used internally currently, so this issue is so that anyone can use it.

I hadn't actually thought of doing a pode.[ENV.]json, but I do like that so I'll add it as a task.

Badgerati added a commit that referenced this issue Jan 22, 2019
@Badgerati Badgerati added this to the 0.25.0 milestone Jan 22, 2019
Badgerati added a commit that referenced this issue Jan 22, 2019
Badgerati added a commit that referenced this issue Jan 23, 2019
@Badgerati Badgerati self-assigned this Jan 23, 2019
Badgerati added a commit that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants