diff --git a/README.md b/README.md index be162af..78bd659 100644 --- a/README.md +++ b/README.md @@ -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 "RPC_HOST" : "localhost", // eth JSON-RPC host "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 + "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_SECRET" : "", // WebSockets api server secret used for login } diff --git a/app.json b/app.json index 7b68aa6..8be232f 100644 --- a/app.json +++ b/app.json @@ -12,7 +12,9 @@ "NODE_ENV" : "production", "RPC_HOST" : "localhost", "RPC_PORT" : "8080", + "LISTENING_PORT" : "30303", "INSTANCE_NAME" : "", + "CONTACT_DETAILS" : "", "WS_SERVER" : "wss://eth-netstats.herokuapp.com", "WS_SECRET" : "eth-net-stats-has-a-secret", } diff --git a/lib/node.js b/lib/node.js index b2cb029..cc8206c 100644 --- a/lib/node.js +++ b/lib/node.js @@ -4,6 +4,7 @@ var os = require('os'); var shelljs = require('shelljs'); var debounce = require('debounce'); var registrar = require('./registrar.js'); +var pjson = require('./../package.json'); var Primus = require('primus'), Emitter = require('primus-emit'), @@ -55,12 +56,15 @@ function Node() } this.info = { + client: pjson.version, name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()), + contact: (process.env.CONTACT_DETAILS || ""), node: ETH_VERSION, net: NET_VERSION, api: API_VERSION, + port: (process.env.LISTENING_PORT || 30303), os: os.platform(), - os_v: os.release() + os_v: os.release(), }; this.id = _.camelCase(this.info.name); diff --git a/package.json b/package.json index f323851..0766ebf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eth-net-intelligence-api", "description": "Ethereum Network Intelligence API", - "version": "0.0.3", + "version": "0.0.4", "private": true, "main": "./app.js", "directories": { diff --git a/processes-ec2.json b/processes-ec2.json index 01b1044..0d70794 100644 --- a/processes-ec2.json +++ b/processes-ec2.json @@ -29,7 +29,9 @@ "NODE_ENV" : "production", "RPC_HOST" : "localhost", "RPC_PORT" : "8080", + "LISTENING_PORT" : "30303", "INSTANCE_NAME" : "", + "CONTACT_DETAILS" : "", "WS_SERVER" : "wss://eth-netstats.herokuapp.com", "WS_SECRET" : "eth-net-stats-has-a-secret", }