Skip to content
Permalink
Browse files

Select the provider through an environment variable (INFURA#9)

  • Loading branch information...
eduadiez authored and egalano committed Feb 10, 2019
1 parent 02c8cf5 commit 15c9ec26399d11171a2e0f54dcf0265ba9ea6f05
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
@@ -11,7 +11,7 @@ const _ = require('lodash')
const db = require('./lib/db')()
const Common = require('ethereumjs-common')
const c = new Common('mainnet')
const web3Url = `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`
const web3Url = process.env.PROVIDER || `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`
web3.setProvider(new web3.providers.HttpProvider(web3Url))

const { EthPeer, PeerErr } = db

0 comments on commit 15c9ec2

Please sign in to comment.
You can’t perform that action at this time.