-
Notifications
You must be signed in to change notification settings - Fork 5
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
Environment configs #17
Comments
Yes, to link the two together you could simply put something like this at the top of your app file:
|
Thanks @theganyo what's the reason for not using |
There was no particular intent to it other than NODE_ENV being the standard method of control for this kind of thing in node. Retrospectively, I guess one could argue that there may be times that users don't want to use APIGEE_ENVIRONMENT for this purpose, but I'm not sure how strong an argument that really is. |
Thanks for clarifying, I only ask as coming from a native node.js background, it seems odd to me to specify the NODE_ENV at the application/code layer rather than having the process manager specify it. Can this stance be documented somewhere if it isn't already? My colleagues have also run into this issue before. |
I think that's a fair point, it would be preferable that Edge set NODE_ENV as node developers would expect. |
That would be great, especially as many modules in the ecosystem such as express have slight behavioural differences when run under |
Trying to use environment specific configurations on Edge. However, it only seems to pick up default.yaml on a
test
environment, and nevertest.yaml
.I've logged the environment variables, and
APIGEE_ENVIRONMENT
contains the correct value. However, magic is looking forA127_ENV
orNODE_ENV
when attempting to load the environment config, which don't appear to be defined.Is it recommended to define either
NODE_ENV
orA127_ENV
manually based on theAPIGEE_ENVIRONMENT
at the application level before callinginit
instead?The text was updated successfully, but these errors were encountered: