Merge pull request #382 from shocknet/fix/config-for-peers

use config
This commit is contained in:
CapDog 2021-05-14 18:01:05 -04:00 committed by GitHub
commit fda426544e

View file

@ -443,6 +443,7 @@ const authenticate = async (alias, pass, __user) => {
return ack.sea.pub
} else {
console.log(ack)
logger.error(
`Unknown error, wrong password? Ack looks like: ${JSON.stringify(ack)}`
)
@ -455,6 +456,7 @@ const logoff = () => {
}
const instantiateGun = () => {
const Config = require('../config')
if (user) {
user.leave()
}
@ -469,7 +471,7 @@ const instantiateGun = () => {
const _gun = /** @type {unknown} */ (new Gun({
axe: false,
multicast: false,
peers: ['https://gun.shock.network:8765/gun']
peers: Config.PEERS
}))
gun = /** @type {GUNNode} */ (_gun)