Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using config file from env.

  • Loading branch information...
commit 7f424e649964720b99f244636c86363c00661118 1 parent c9b3093
@iced iced authored
Showing with 6 additions and 2 deletions.
  1. +3 −1 lib/client.js
  2. +3 −1 src/client.coffee
View
4 lib/client.js
@@ -34,7 +34,9 @@
this.options_list = ['scheme', 'host', 'port', 'user_agent'].concat(extra_options_list);
this.options = {};
this.load_from_hash('params', options);
- this.load_from_config(company, product, options.config_file);
+ this.load_from_config(company, product, options.config);
+ this.load_from_config(company, product, process.env[company.toUpperCase() + '_' + product.toUpperCase() + '_CONFIG']);
+ this.load_from_config(company, product, process.env[company.toUPperCase() + '_CONFIG']);
this.load_from_env(company.toUpperCase() + '_' + product.toUpperCase());
this.load_from_env(company.toUpperCase());
this.load_from_config(company, product, "./." + company + ".json");
View
4 src/client.coffee
@@ -17,7 +17,9 @@ class Client
@options = {}
@load_from_hash('params', options)
- @load_from_config(company, product, options.config_file)
+ @load_from_config(company, product, options.config)
+ @load_from_config(company, product, process.env[company.toUpperCase() + '_' + product.toUpperCase() + '_CONFIG'])
+ @load_from_config(company, product, process.env[company.toUPperCase() + '_CONFIG'])
@load_from_env(company.toUpperCase() + '_' + product.toUpperCase())
@load_from_env(company.toUpperCase())
@load_from_config(company, product, "./.#{company}.json")
Please sign in to comment.
Something went wrong with that request. Please try again.