{"action":"created","issue":{"url":"https://api.github.com/repos/lorenwest/node-config/issues/283","labels_url":"https://api.github.com/repos/lorenwest/node-config/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/lorenwest/node-config/issues/283/comments","events_url":"https://api.github.com/repos/lorenwest/node-config/issues/283/events","html_url":"https://github.com/lorenwest/node-config/issues/283","id":126184786,"number":283,"title":"default.json being read rather than NODE_ENV value","user":{"login":"PorridgeBear","id":311566,"avatar_url":"https://avatars.githubusercontent.com/u/311566?v=3","gravatar_id":"","url":"https://api.github.com/users/PorridgeBear","html_url":"https://github.com/PorridgeBear","followers_url":"https://api.github.com/users/PorridgeBear/followers","following_url":"https://api.github.com/users/PorridgeBear/following{/other_user}","gists_url":"https://api.github.com/users/PorridgeBear/gists{/gist_id}","starred_url":"https://api.github.com/users/PorridgeBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PorridgeBear/subscriptions","organizations_url":"https://api.github.com/users/PorridgeBear/orgs","repos_url":"https://api.github.com/users/PorridgeBear/repos","events_url":"https://api.github.com/users/PorridgeBear/events{/privacy}","received_events_url":"https://api.github.com/users/PorridgeBear/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-12T13:56:12Z","updated_at":"2016-01-12T16:05:58Z","closed_at":"2016-01-12T16:05:58Z","body":"I am deploying via Capistrano. I have config/default.json and config/uat.json both equivalent in structure with uat.json specifying some custom vars. When the script is being started up it is taking the code path that is configured by default.json's values and not uat.json.\r\n\r\nIn Capistrano's config I create a custom environment var NODE_ENV=uat. When Capistrano deploys it executes my node script using /usr/bin/env:\r\n```\r\n/usr/bin/env cd /var/www/myapp/releases/20160112134909/ && forever start -p /var/www/myapp/shared/ --pidFile /var/www/myapp/shared/server.pid myapp.js\r\n```\r\nRunning /usr/env/bin in the CLI shows correctly:\r\n```\r\nNODE_ENV=uat\r\n```\r\nas does echo $NODE_ENV.\r\n\r\nI created a test.js file on the same server and within it added:\r\n```\r\n console.log(process.env.NODE_ENV) \r\n```\r\nThis, too, outputs uat.\r\n\r\nSo all in all this seems right from the NODE_ENV side but uat.json is not being merged over default.json.\r\n\r\nTips/advice appreciated!"},"comment":{"url":"https://api.github.com/repos/lorenwest/node-config/issues/comments/170958834","html_url":"https://github.com/lorenwest/node-config/issues/283#issuecomment-170958834","issue_url":"https://api.github.com/repos/lorenwest/node-config/issues/283","id":170958834,"user":{"login":"markstos","id":25829,"avatar_url":"https://avatars.githubusercontent.com/u/25829?v=3","gravatar_id":"","url":"https://api.github.com/users/markstos","html_url":"https://github.com/markstos","followers_url":"https://api.github.com/users/markstos/followers","following_url":"https://api.github.com/users/markstos/following{/other_user}","gists_url":"https://api.github.com/users/markstos/gists{/gist_id}","starred_url":"https://api.github.com/users/markstos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstos/subscriptions","organizations_url":"https://api.github.com/users/markstos/orgs","repos_url":"https://api.github.com/users/markstos/repos","events_url":"https://api.github.com/users/markstos/events{/privacy}","received_events_url":"https://api.github.com/users/markstos/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T16:05:58Z","updated_at":"2016-01-12T16:05:58Z","body":"Issue appears to be external to node-config, so closing this. \r\n\r\nRe-open if there appears to be a node-config bug. "}}