
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@dashevo/js-evo-services-ctl
Advanced tools
Control Dash Platform services using JavaScript and Docker
Control Dash Platform services using JavaScript and Docker
The tool provides a convenient JavaScript interface for configuration and interaction with Dash Platform services. Services are started in Docker containers.
Install NPM package:
npm install @dashevo/js-evo-services-ctl
Drive service starts a bunch of related services:
DAPI service starts all DP services:
Dash Core service - Methods - Options
// Export service(s)
const { startIPFS } = require('@dashevo/js-evo-services-ctl');
// This is optional. Default options listed in options class
const options = {
port: 5001, // IPFS port
};
// Start service
const ipfs = await startIPFS(options);
// Get peer ID
const peerId = await ipfs.getApi().id();
// Stop IPFS
await ipfs.remove();
Use many method to start several instances:
const { startIPFS } = require('@dashevo/js-evo-services-ctl');
// This is optional. Default options listed in options class
const options = {
port: 5001, // IPFS port
};
// Start two services
const ipfsNodes = await startIPFS.many(2, options);
// Get peer IDs
const [peerId1, peerId2] = await Promise.all(
ipfsNodes.map(ipfs => ipfs.getApi().id()),
);
// Stop IPFS nodes
await Promise.all(
ipfsNodes.map(ipfs => ipfs.remove()),
);
Each service has default options which can be overwrited in three ways:
start[service] or create[service] methodsstart[service] or create[service] methodssetDefaultCustomOptions method of options classServices Mocha hooks provide automatization for your mocha tests:
before)beforeEach, afterEach)after)// Export service(s) with mocha hooks
const { mocha: { startIPFS } } = require('@dashevo/js-evo-services-ctl');
describe('Test suite', () => {
let ipfsApi;
startIPFS().then(ipfs => () => {
ipfsApi = ipfs.getApi();
});
it('should do something', async () => {
const peerId = await ipfsApi.id();
expect(peerId).to.be.a('string');
});
});
Feel free to dive in! Open an issue or submit PRs.
MIT © Dash Core Group, Inc.
FAQs
Control Dash Platform services using JavaScript and Docker
We found that @dashevo/js-evo-services-ctl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.