move help text to --help
This commit is contained in:
parent
4dcc246ea5
commit
b7f25852d5
32
insight.js
32
insight.js
@ -10,11 +10,14 @@ var HistoricSync = require('./lib/HistoricSync');
|
|||||||
|
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var connect = require('connect');
|
var connect = require('connect');
|
||||||
|
var program = require('commander');
|
||||||
|
|
||||||
var config = require('./config/config');
|
var config = require('./config/config');
|
||||||
|
var logger = require('./lib/logger').logger;
|
||||||
|
program
|
||||||
|
.version(config.version);
|
||||||
|
|
||||||
// text title
|
// text title
|
||||||
/*jshint multistr: true */
|
|
||||||
console.log(
|
console.log(
|
||||||
'\n\
|
'\n\
|
||||||
____ _ __ __ ___ _ \n\
|
____ _ __ __ ___ _ \n\
|
||||||
@ -23,8 +26,9 @@ console.log(
|
|||||||
_/ // / / (__ ) / /_/ / / / / /_ / ___ |/ /_/ / / \n\
|
_/ // / / (__ ) / /_/ / / / / /_ / ___ |/ /_/ / / \n\
|
||||||
/___/_/ /_/____/_/\\__, /_/ /_/\\__/ /_/ |_/ .___/_/ \n\
|
/___/_/ /_/____/_/\\__, /_/ /_/\\__/ /_/ |_/ .___/_/ \n\
|
||||||
/____/ /_/ \n\
|
/____/ /_/ \n\
|
||||||
\n\t\t\t\t\t\tv%s\n\
|
\n\t\t\t\t\t\tv%s\n', config.version);
|
||||||
# Configuration:\n\
|
program.on('--help', function() {
|
||||||
|
logger.info('\n# Configuration:\n\
|
||||||
\tINSIGHT_NETWORK (Network): %s\n\
|
\tINSIGHT_NETWORK (Network): %s\n\
|
||||||
\tINSIGHT_DB (Database Path): %s\n\
|
\tINSIGHT_DB (Database Path): %s\n\
|
||||||
\tINSIGHT_SAFE_CONFIRMATIONS (Safe Confirmations): %s\n\
|
\tINSIGHT_SAFE_CONFIRMATIONS (Safe Confirmations): %s\n\
|
||||||
@ -41,18 +45,18 @@ console.log(
|
|||||||
\nChange setting by assigning the enviroment variables above. Example:\n\
|
\nChange setting by assigning the enviroment variables above. Example:\n\
|
||||||
$ INSIGHT_NETWORK="testnet" BITCOIND_HOST="123.123.123.123" ./insight.js\
|
$ INSIGHT_NETWORK="testnet" BITCOIND_HOST="123.123.123.123" ./insight.js\
|
||||||
\n\n',
|
\n\n',
|
||||||
config.version,
|
config.network, config.leveldb, config.safeConfirmations, config.ignoreCache ? 'yes' : 'no',
|
||||||
config.network, config.leveldb, config.safeConfirmations, config.ignoreCache ? 'yes' : 'no',
|
config.bitcoind.user,
|
||||||
config.bitcoind.user,
|
config.bitcoind.pass ? 'Yes(hidden)' : 'No',
|
||||||
config.bitcoind.pass ? 'Yes(hidden)' : 'No',
|
config.bitcoind.protocol,
|
||||||
config.bitcoind.protocol,
|
config.bitcoind.host,
|
||||||
config.bitcoind.host,
|
config.bitcoind.port,
|
||||||
config.bitcoind.port,
|
config.bitcoind.p2pPort,
|
||||||
config.bitcoind.p2pPort,
|
config.bitcoind.dataDir + (config.network === 'testnet' ? '*' : ''), (config.network === 'testnet' ? '* (/testnet3 is added automatically)' : '')
|
||||||
config.bitcoind.dataDir + (config.network === 'testnet' ? '*' : ''), (config.network === 'testnet' ? '* (/testnet3 is added automatically)' : '')
|
);
|
||||||
);
|
});
|
||||||
|
|
||||||
|
|
||||||
|
program.parse(process.argv);
|
||||||
|
|
||||||
// create express app
|
// create express app
|
||||||
var expressApp = express();
|
var expressApp = express();
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
"bitcore": "git://github.com/bitpay/bitcore.git#aa41c70cff2583d810664c073a324376c39c8b36",
|
"bitcore": "git://github.com/bitpay/bitcore.git#aa41c70cff2583d810664c073a324376c39c8b36",
|
||||||
"bufferput": "git://github.com/bitpay/node-bufferput.git",
|
"bufferput": "git://github.com/bitpay/node-bufferput.git",
|
||||||
"buffertools": "*",
|
"buffertools": "*",
|
||||||
"commander": "*",
|
"commander": "^2.3.0",
|
||||||
"connect": "^2.25.7",
|
"connect": "^2.25.7",
|
||||||
"connect-ratelimit": "0.0.6",
|
"connect-ratelimit": "0.0.6",
|
||||||
"express": "~3.4.7",
|
"express": "~3.4.7",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user