Merge pull request #18 from cubedro/develop

added Instance name
This commit is contained in:
Marian OANCΞA 2015-03-19 15:32:33 +02:00
commit 820c083a96
4 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,7 @@ Configure the app modifying [processes.json](/eth-net-intelligence-api/blob/mast
"RPC_HOST" : "localhost", // eth JSON-RPC host
"RPC_PORT" : "8080", // eth JSON-RPC port
"ETH_IMPLEMENTATION" : "cpp", // eth implementation: "cpp" or "go"
"INSTANCE_NAME" : "",
"WS_SERVER" : "", // path to eth-netstats WebSockets api server
"WS_SECRET" : "", // WebSockets api server secret used for login
}

View File

@ -20,7 +20,10 @@ var INSTANCE_NAME,
if(process.env.NODE_ENV === 'production')
{
INSTANCE_NAME = shelljs.exec('ec2metadata --instance-id', {silent: true}).output;
if(process.env.INSTANCE_NAME !== "")
{
INSTANCE_NAME = shelljs.exec('ec2metadata --instance-id', {silent: true}).output;
}
ETH_VERSION = shelljs.exec((process.env.ETH_IMPLEMENTATION === 'go' ? 'ethereum -version' : 'eth -V'), {silent: true}).output;
}

View File

@ -30,6 +30,7 @@
"RPC_HOST" : "localhost",
"RPC_PORT" : "8080",
"ETH_IMPLEMENTATION" : "go",
"INSTANCE_NAME" : "",
"WS_SERVER" : "wss://eth-netstats.herokuapp.com",
"WS_SECRET" : "eth-net-stats-has-a-secret",
}

View File

@ -30,6 +30,7 @@
"RPC_HOST" : "localhost",
"RPC_PORT" : "8080",
"ETH_IMPLEMENTATION" : "cpp",
"INSTANCE_NAME" : "",
"WS_SERVER" : "wss://eth-netstats.herokuapp.com",
"WS_SECRET" : "eth-net-stats-has-a-secret",
}