Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
server = app.listen(port);
} else {
blockchainService.initialize()
.then(() => {
server = app.listen(port, () => {
console.log(`Sidetree-Bitcoin node running on port: ${port}`);
});
})
.catch((error) => {
console.error(`Sidetree-Bitcoin node initialization failed with error: ${error}`);
process.exit(1);
});
}
} catch (error) {
console.log('Is bitcoinWalletImportString valid? Consider using testnet key generated below:');
console.log(SidetreeBitcoinProcessor.generatePrivateKey('testnet'));
process.exit(1);
}
console.info('Sidetree bitcoin service configuration:');
console.info(config);
export {
server,
blockchainService
};