Renaming usergrid.json in the example Since the code in the module crawls the app folders including node_modules to find a file named usergrid.json or config.json, the config.json under the examples gets read and may overwrite the app specific configs for the usergrid.
With this change, if a user is intending to run the example code, they will need to rename the related config "/example/api-proxy/config/usergrid.example.json" to "/example/api-proxy/config/usergrid.json". Project: http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/commit/3613f6ba Tree: http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/tree/3613f6ba Diff: http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/diff/3613f6ba Branch: refs/heads/master Commit: 3613f6ba586569fb303ad12bf82769befcfcf098 Parents: 0bfa2a2 Author: YasharF <yasharf_ju...@ydftech.com> Authored: Sun Jul 31 19:39:52 2016 -0700 Committer: YasharF <yasharf_ju...@ydftech.com> Committed: Sun Jul 31 19:39:52 2016 -0700 ---------------------------------------------------------------------- examples/api-proxy/README.md | 4 ++++ examples/api-proxy/config/usergrid.example.json | 8 ++++++++ examples/api-proxy/config/usergrid.json | 8 -------- 3 files changed, 12 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/blob/3613f6ba/examples/api-proxy/README.md ---------------------------------------------------------------------- diff --git a/examples/api-proxy/README.md b/examples/api-proxy/README.md new file mode 100644 index 0000000..db03d0a --- /dev/null +++ b/examples/api-proxy/README.md @@ -0,0 +1,4 @@ +To use this example, rename the `usergrid.example.json` to `usergrid.json`. +This file is located at `examples/api-proxy/config`. + +**Note:** The usergrid module crawls your App file structure to find files named `usergrid.json` or a `config.json`. If there are multiple files with one of these names present at different locations under the app, only one of them will be used and the others are ignored. This may cause use of an unintended backend. http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/blob/3613f6ba/examples/api-proxy/config/usergrid.example.json ---------------------------------------------------------------------- diff --git a/examples/api-proxy/config/usergrid.example.json b/examples/api-proxy/config/usergrid.example.json new file mode 100644 index 0000000..5d13860 --- /dev/null +++ b/examples/api-proxy/config/usergrid.example.json @@ -0,0 +1,8 @@ +{ + "appId": "sandbox", + "orgId": "brandon.apigee", + "authFallback": "NONE", + "baseUrl": "https://api.usergrid.com", + "clientId": "YXA6GXSAACS2EeOYd20aP4G6Lw", + "clientSecret": "YXA66BeEvgNpJBwc4PAbvZZGTVS_SSw" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid-nodejs/blob/3613f6ba/examples/api-proxy/config/usergrid.json ---------------------------------------------------------------------- diff --git a/examples/api-proxy/config/usergrid.json b/examples/api-proxy/config/usergrid.json deleted file mode 100644 index 5d13860..0000000 --- a/examples/api-proxy/config/usergrid.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "appId": "sandbox", - "orgId": "brandon.apigee", - "authFallback": "NONE", - "baseUrl": "https://api.usergrid.com", - "clientId": "YXA6GXSAACS2EeOYd20aP4G6Lw", - "clientSecret": "YXA66BeEvgNpJBwc4PAbvZZGTVS_SSw" -} \ No newline at end of file