It might not be when installing btc-rpc-explorer globally (npm install -g).
Without this, running btc-rpc-explorer without .git resulted in:
fatal: Not a git repository (or any parent up to mount point /home/user)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Cannot read property 'all' of null
at btc-rpc-explorer/app.js:334:35
Without this fix, running btc-rpc-explorer without setting
BTCEXP_ELECTRUMX_SERVERS was being parsed as single empty-string
server, which resulted in the following error:
btc-rpc-explorer/app/config.js:33
electrumXServers.push({protocol:uri.protocol.substring(0, uri.protocol.length - 1), host:uri.hostname, port:parseInt(uri.port)});
^
TypeError: Cannot read property 'substring' of null
at Object.<anonymous> (btc-rpc-explorer/app/config.js:33:47)
- configure electrumX servers with the same mechanisms as everything else
- include _PORT and _ELECTRUMX_SERVERS configs in .env-sample
- drop support for overriding configs via app/credentials.js, and use that filename for the new, dynamic, env-based credentials config file
- updated package-lock
- include sample .env file for easy reference
- continue to support key-by-key updating from credentials.js for now
- minor code formatting
- reflect status of BTCEXP_NO_RATES in UI when applicable (hide new exchanged-currency items from display dropdown and hide exchange rate on homepage)
- rename _LOGIN to _BASIC_AUTH_PASSWORD for clarity
- tweak README to call out .env-sample
This ensures a unique, hard-to-guess cookie secret for every instance.
Also, renamed from "cookiePassword" to "cookieSecret" to better express
its meaning.