use config

This commit is contained in:
hatim boufnichel 2021-05-15 00:00:12 +02:00
parent feb400423c
commit faf6f83441

View file

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