cruise
cruise copied to clipboard
Encounter problems when running Quickstart and A simple K/V store
Hi, when I use the code in the Quickstart to boot up a three node cluster. I encounter the following problem:
node.peer(peer.addr()); ^ TypeError: undefined is not a function
Do I need to change some codes provided in the readme? Thanks.
In addition, In the A simple K/V store example, I simply copy the upper code into a file called db.js and the lower code into a file called cruise.js. Then I run cruise.js. I encounter the following problem:
db.js:18 cruise.on('data', function(data){ ^ ReferenceError: cruise is not defined
So I add 'this' before 'cruise.on' and it becomes: this.cruise.on('data', function(data)...... I run cruise.js again. This time I encounter another problem:
db.js:30 this.cruise.peer(addr); ^ TypeError: undefined is not a function
I am a little confused and do I also need to further change some code to make it run successfully on my machine? Thanks