Skip to content

Commit

Permalink
more config to env for updated inatjs
Browse files Browse the repository at this point in the history
  • Loading branch information
pleary committed Dec 14, 2016
1 parent 2bfe361 commit e9544bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 12 additions & 5 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,19 @@ var util = class util {
}

static appendNodeENV( ) {
if( config.apiURL ) {
process.env.API_URL = config.apiURL;
}
if( config.writeApiURL ) {
process.env.WRITE_API_URL = config.writeApiURL;
var configToEnv = {
apiHost: "API_HOST",
apiHostSSL: "API_HOST_SSL",
apiURL: "API_URL",
writeApiHost: "WRITE_API_HOST",
writeHostSSL: "WRITE_HOST_SSL",
writeApiURL: "WRITE_API_URL"
}
_.each( configToEnv, ( env, conf ) => {
if( config[ conf ] ) {
process.env[ env ] = config[ conf ];
}
});
}

static fix_https( str ) {
Expand Down
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9544bf

Please sign in to comment.