Closed katian closed 6 years ago
I try this little js
"use strict"; const dnode = require('dnode'); const daemon = dnode.connect('127.0.0.1', 4000); daemon.on('remote', d_remote); daemon.on('fail', d_fail); daemon.on('error', d_error); function d_remote() { console.log("remote"); } function d_fail() { console.log("fail"); } function d_error() { console.log("error"); } my node is running on localhost port 4000 but this script never ends...
"use strict";
const dnode = require('dnode');
const daemon = dnode.connect('127.0.0.1', 4000);
daemon.on('remote', d_remote); daemon.on('fail', d_fail); daemon.on('error', d_error);
function d_remote() { console.log("remote"); }
function d_fail() { console.log("fail"); }
function d_error() { console.log("error"); }
my node is running on localhost port 4000 but this script never ends...
You are trying to connect to the node itself. Thats not the port you should connect to. You want to connect to the daemon which runs the nodes, default port is 45015.
ok thanks
I try this little js