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
[Swift] Use environment variables for vapor #2830
Conversation
@@ -3,5 +3,8 @@ framework: | |||
version: 4.7 | |||
name: vapor | |||
|
|||
options: serve --hostname 0.0.0.0 --port 3000 --env prod | |||
environment: | |||
SERVER_HOSTNAME: 0.0.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vapor won't automatically pick up these environment variables (yet - there is an open discussion about that, so this would require code changes as well to read these)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was the case since vapor/vapor#2333 (comment)
btw, this is working, but perhaps 0.0.0.0:3000
is the default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's hardcoded in currently, I can submit a PR to change that if you like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, it'll be a pleasure, taking from env
is easier to maintain ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xTim any time for this PR
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waghanza yeah I'll try and get some time to do it tonight otherwise I'll do it tomorrow morning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
This
PR
adds environment variables usage for https://github.com/vapor/vaporIt facilitate maintenance / homogenization for all frameworks.
Regards,