flocore-node/lib/scaffold/default-base-config.js
Braydon Fuller 0f24dd5f49 config: update configuration options for exec path
- config options for bitcoind to specify exec path of bitcoind
- config options to connect to multiple bitcoind processes
- systemd and upstart preferred methods to daemonize
2016-04-08 11:59:26 -04:00

32 lines
743 B
JavaScript

'use strict';
var path = require('path');
/**
* Will return the path and default bitcore-node configuration on environment variables
* or default locations.
* @param {Object} options
* @param {String} options.network - "testnet" or "livenet"
*/
function getDefaultBaseConfig(options) {
if (!options) {
options = {};
}
return {
path: process.cwd(),
config: {
network: options.network || 'livenet',
port: 3001,
services: ['bitcoind', 'web'],
servicesConfig: {
bitcoind: {
datadir: options.datadir || path.resolve(process.env.HOME, '.bitcoin'),
exec: path.resolve(__dirname, '../../dist/bitcoind')
}
}
}
};
}
module.exports = getDefaultBaseConfig;