Browse Source
support for disabling influx by setting BTCEXP_ENABLE_INFLUXDB=false
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
1 changed files with
8 additions and
1 deletions
-
app/credentials.js
|
|
@ -7,7 +7,14 @@ var btcAuth = btcUri.auth ? btcUri.auth.split(':') : []; |
|
|
|
|
|
|
|
var ifxUri = process.env.BTCEXP_INFLUXDB_URI ? url.parse(process.env.BTCEXP_INFLUXDB_URI, true) : { query: { } }; |
|
|
|
var ifxAuth = ifxUri.auth ? ifxUri.auth.split(':') : []; |
|
|
|
var ifxActive = !!process.env.BTCEXP_ENABLE_INFLUXDB || Object.keys(process.env).some(k => k.startsWith('BTCEXP_INFLUXDB_')); |
|
|
|
|
|
|
|
var ifxActive = false; |
|
|
|
if (process.env.BTCEXP_ENABLE_INFLUXDB != null) { |
|
|
|
ifxActive = (process.env.BTCEXP_ENABLE_INFLUXDB.toLowerCase() == "true"); |
|
|
|
|
|
|
|
} else { |
|
|
|
ifxActive = Object.keys(process.env).some(k => k.startsWith('BTCEXP_INFLUXDB_')); |
|
|
|
} |
|
|
|
|
|
|
|
module.exports = { |
|
|
|
rpc: { |
|
|
|