Browse Source
Merge branch 'shesek-bind-host'
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
2 changed files with
5 additions and
3 deletions
-
bin/cli.js
-
bin/www
|
|
@ -6,6 +6,7 @@ const args = require('meow')(` |
|
|
|
|
|
|
|
Options |
|
|
|
-p, --port <port> port to bind http server [default: 3002] |
|
|
|
-i, --host <host> host to bind http server [default: 127.0.0.1] |
|
|
|
-a, --basic-auth-password <..> protect web interface with a password [default: no password] |
|
|
|
-C, --coin <coin> crypto-coin to enable [default: BTC] |
|
|
|
|
|
|
@ -53,7 +54,7 @@ const args = require('meow')(` |
|
|
|
$ BTCEXP_PORT=8080 BTCEXP_BITCOIND_PORT=18443 BTCEXP_BITCOIND_COOKIE=~/.bitcoin/regtest/.cookie btc-rpc-explorer |
|
|
|
|
|
|
|
|
|
|
|
`, { flags: { port: {alias:'p'}, basicAuthPassword: {alias:'a'}, coin: {alias:'C'}
|
|
|
|
`, { flags: { port: {alias:'p'}, host: {alias:'i'}, basicAuthPassword: {alias:'a'}, coin: {alias:'C'}
|
|
|
|
, bitcoindUri: {alias:'b'}, bitcoindHost: {alias:'H'}, bitcoindPort: {alias:'P'} |
|
|
|
, bitcoindCookie: {alias:'c'}, bitcoindUser: {alias:'u'}, bitcoindPass: {alias:'w'} |
|
|
|
, demo: {type:'boolean'}, rpcAllowall: {type:'boolean'}, electrumxServers: {alias:'E'} |
|
|
|
|
|
@ -3,9 +3,10 @@ var debug = require('debug')('my-application'); |
|
|
|
var app = require('../app'); |
|
|
|
|
|
|
|
app.set('port', process.env.PORT || process.env.BTCEXP_PORT || 3002); |
|
|
|
app.set('host', process.env.BTCEXP_HOST || '127.0.0.1'); |
|
|
|
|
|
|
|
var server = app.listen(app.get('port'), function() { |
|
|
|
debug('Express server listening on port ' + server.address().port); |
|
|
|
var server = app.listen(app.get('port'), app.get('host'), function() { |
|
|
|
debug('Express server listening on ' + server.address().address + ':' + server.address().port); |
|
|
|
|
|
|
|
if (app.runOnStartup) { |
|
|
|
app.runOnStartup(); |
|
|
|