You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following the demo video on youtube: https://www.youtube.com/watch?v=Nv_Teb--1zg
But when I add a room in my code and test it. The console gives no reactions when another peer joined the room.
Here's my code:
const IPFS = require('ipfs')
const Room = require('ipfs-pubsub-room')
const ipfs = new IPFS({
repo: repo(),
EXPERIMENTAL: {
pubsub : true
}
})
ipfs.once('ready', () => ipfs.id((err,info) => {
if (err) {throw err}
console.log('IPFS is ready with the address ' + info.id)
}))
const room = Room(ipfs, 'ipfs-pubsub-room-demo')
console.log(room.id)
room.on('peer joined', (peer) => console.log('some peer '+ peer +' has joined'))
room.on('peer left', (peer) => console.log('some peer '+ peer +' has left'))
function repo () {
return 'ipfs/pubsub-demo/' + Math.random()
}
And when I test the code on Chrome, the console only gives the ID of the node, but no messages like 'some peer XXXX has joined.'
The text was updated successfully, but these errors were encountered:
I was following the demo video on youtube: https://www.youtube.com/watch?v=Nv_Teb--1zg
But when I add a room in my code and test it. The console gives no reactions when another peer joined the room.
Here's my code:
And when I test the code on Chrome, the console only gives the ID of the node, but no messages like 'some peer XXXX has joined.'
The text was updated successfully, but these errors were encountered: