Merge pull request #4 from Permissionless-Software-Foundation/ct-unstable

fix(config): Adding env var for signaling circuit relay
This commit is contained in:
Chris Troutner
2021-04-09 12:33:37 -07:00
committed by GitHub
2 changed files with 15 additions and 2 deletions
+11 -1
View File
@@ -3,10 +3,20 @@
environments.
*/
/* eslint no-unneeded-ternary:0 */
module.exports = {
// Configure TCP port.
port: process.env.PORT || 5001,
// Password for HTML UI that displays logs.
logPass: 'test',
// Email server settings if nodemailer email notifications are used.
emailServer: process.env.EMAILSERVER ? process.env.EMAILSERVER : 'mail.someserver.com',
emailUser: process.env.EMAILUSER ? process.env.EMAILUSER : 'noreply@someserver.com',
emailPassword: process.env.EMAILPASS ? process.env.EMAILPASS : 'emailpassword'
emailPassword: process.env.EMAILPASS ? process.env.EMAILPASS : 'emailpassword',
// IPFS settings.
isCircuitRelay: process.env.ENABLE_CIRCUIT_RELAY ? true : false
}
+4 -1
View File
@@ -10,6 +10,7 @@ const IpfsCoord = require('ipfs-coord')
const BCHJS = require('@psf/bch-js')
// Local libraries
const config = require('../../config')
const JSONRPC = require('../rpc')
class IPFSLib {
@@ -19,6 +20,7 @@ class IPFSLib {
this.IpfsCoord = IpfsCoord
this.bchjs = new BCHJS()
this.rpc = new JSONRPC()
this.config = config
// this.rpc = {}
// if (localConfig.rpc) {
@@ -81,7 +83,8 @@ class IPFSLib {
ipfs: this.ipfs,
type: 'node.js',
bchjs: this.bchjs,
privateLog: this.rpc.router
privateLog: this.rpc.router,
isCircuitRelay: this.config.isCircuitRelay
})
await this.ipfsCoord.isReady()