calxibe / StorjMonitor

Node.js script for publishing data from local Storj nodes to Storjstat.com
15 stars 14 forks source link

connexion test #27

Closed katian closed 6 years ago

katian commented 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...

stefanbenten commented 6 years ago

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.

katian commented 6 years ago

ok thanks