Merge pull request #79 from cubedro/develop

Added more fields to info
This commit is contained in:
Marian OANCΞA 2015-04-17 00:41:27 +03:00
commit 41449a410b
5 changed files with 12 additions and 2 deletions

View File

@ -28,7 +28,9 @@ Configure the app modifying [processes.json](/eth-net-intelligence-api/blob/mast
"NODE_ENV" : "production", // tell the client we're in production environment "NODE_ENV" : "production", // tell the client we're in production environment
"RPC_HOST" : "localhost", // eth JSON-RPC host "RPC_HOST" : "localhost", // eth JSON-RPC host
"RPC_PORT" : "8080", // eth JSON-RPC port "RPC_PORT" : "8080", // eth JSON-RPC port
"LISTENING_PORT" : "30303", // eth listening port (only used for display)
"INSTANCE_NAME" : "", // whatever you wish to name your node "INSTANCE_NAME" : "", // whatever you wish to name your node
"CONTACT_DETAILS" : "", // add your contact details here if you wish (email/skype)
"WS_SERVER" : "wss://eth-netstats.herokuapp.com", // path to eth-netstats WebSockets api server "WS_SERVER" : "wss://eth-netstats.herokuapp.com", // path to eth-netstats WebSockets api server
"WS_SECRET" : "", // WebSockets api server secret used for login "WS_SECRET" : "", // WebSockets api server secret used for login
} }

View File

@ -12,7 +12,9 @@
"NODE_ENV" : "production", "NODE_ENV" : "production",
"RPC_HOST" : "localhost", "RPC_HOST" : "localhost",
"RPC_PORT" : "8080", "RPC_PORT" : "8080",
"LISTENING_PORT" : "30303",
"INSTANCE_NAME" : "", "INSTANCE_NAME" : "",
"CONTACT_DETAILS" : "",
"WS_SERVER" : "wss://eth-netstats.herokuapp.com", "WS_SERVER" : "wss://eth-netstats.herokuapp.com",
"WS_SECRET" : "eth-net-stats-has-a-secret", "WS_SECRET" : "eth-net-stats-has-a-secret",
} }

View File

@ -4,6 +4,7 @@ var os = require('os');
var shelljs = require('shelljs'); var shelljs = require('shelljs');
var debounce = require('debounce'); var debounce = require('debounce');
var registrar = require('./registrar.js'); var registrar = require('./registrar.js');
var pjson = require('./../package.json');
var Primus = require('primus'), var Primus = require('primus'),
Emitter = require('primus-emit'), Emitter = require('primus-emit'),
@ -55,12 +56,15 @@ function Node()
} }
this.info = { this.info = {
client: pjson.version,
name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()), name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()),
contact: (process.env.CONTACT_DETAILS || ""),
node: ETH_VERSION, node: ETH_VERSION,
net: NET_VERSION, net: NET_VERSION,
api: API_VERSION, api: API_VERSION,
port: (process.env.LISTENING_PORT || 30303),
os: os.platform(), os: os.platform(),
os_v: os.release() os_v: os.release(),
}; };
this.id = _.camelCase(this.info.name); this.id = _.camelCase(this.info.name);

View File

@ -1,7 +1,7 @@
{ {
"name": "eth-net-intelligence-api", "name": "eth-net-intelligence-api",
"description": "Ethereum Network Intelligence API", "description": "Ethereum Network Intelligence API",
"version": "0.0.3", "version": "0.0.4",
"private": true, "private": true,
"main": "./app.js", "main": "./app.js",
"directories": { "directories": {

View File

@ -29,7 +29,9 @@
"NODE_ENV" : "production", "NODE_ENV" : "production",
"RPC_HOST" : "localhost", "RPC_HOST" : "localhost",
"RPC_PORT" : "8080", "RPC_PORT" : "8080",
"LISTENING_PORT" : "30303",
"INSTANCE_NAME" : "", "INSTANCE_NAME" : "",
"CONTACT_DETAILS" : "",
"WS_SERVER" : "wss://eth-netstats.herokuapp.com", "WS_SERVER" : "wss://eth-netstats.herokuapp.com",
"WS_SECRET" : "eth-net-stats-has-a-secret", "WS_SECRET" : "eth-net-stats-has-a-secret",
} }