fix(v5 Fulcrum): Requiring FULCRUM_API env var when starting server

This commit is contained in:
Chris Troutner
2021-06-16 18:33:12 -07:00
parent 9825ec1bab
commit d29f99965f
+6 -1
View File
@@ -32,7 +32,12 @@ class Electrum {
this.bchjs = bchjs
// _this.bitcore = bitcore
this.fulcrumApi = 'http://fulcrum-api.fullstackbch.nl/v1/'
this.fulcrumApi = process.env.FULCRUM_API
if (!this.fulcrumApi) {
throw new Error(
'FULCRUM_API env var not set. Can not connect to Fulcrum indexer.'
)
}
// _this.electrumx = new ElectrumCash(
// 'bch-api',