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

[Swift] Use environment variables for vapor #2830

Closed
wants to merge 1 commit into from
Closed

[Swift] Use environment variables for vapor #2830

wants to merge 1 commit into from

Conversation

waghanza
Copy link
Collaborator

@waghanza waghanza commented Jun 1, 2020

Hi,

This PR adds environment variables usage for https://github.com/vapor/vapor

It facilitate maintenance / homogenization for all frameworks.

Regards,

@@ -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
Copy link
Member

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)

Copy link
Collaborator Author

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

Copy link
Member

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?

Copy link
Collaborator Author

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 ❤️

Copy link
Collaborator Author

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 ?

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@waghanza couldn't push to your branch so I've created #2919

@waghanza waghanza requested a review from 0xTim June 2, 2020 16:09
@waghanza waghanza deleted the swift/vapor/use_env branch June 11, 2020 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants