UNPKG

cryptorescuecore-node

Version:

Full node with extended capabilities using cryptorescuecore and CryptoRescue

35 lines (31 loc) 892 B
'use strict'; var path = require('path'); /** * Will return the path and default cryptorescuecore-node configuration on environment variables * or default locations. * @param {Object} options * @param {String} options.network - "testnet" or "livenet" * @param {String} options.datadir - Absolute path to cryptorescue database directory */ function getDefaultBaseConfig(options) { if (!options) { options = {}; } return { path: process.cwd(), config: { network: options.network || 'livenet', port: 3001, services: ['cryptorescued', 'web'], servicesConfig: { cryptorescued: { spawn: { datadir: options.datadir || path.resolve(process.env.HOME, '.cryptorescue'), exec: path.resolve(__dirname, '../../bin/cryptorescued') } } } } }; } module.exports = getDefaultBaseConfig;