Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Control Dash Platform services using JavaScript and Docker
npm install @dashevo/dp-services-ctl
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Dash Platform Service Controller v0.15.1
Updated on Jul 13, 2023
Dash Platform Service Controller v0.15.0
Updated on Sep 21, 2022
Dash Platform Service Controller v0.19.0-dev.1
Updated on Mar 23, 2021
Dash Platform Service Controller v0.14.0
Updated on Jul 23, 2020
Dash Platform Service Controller v0.14.0-dev.1
Updated on Jun 09, 2020
Dash Platform Service Controller v0.13.1
Updated on Jun 09, 2020
JavaScript (99.23%)
Shell (0.77%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
148 Commits
6 Forks
13 Watchers
7 Branches
15 Contributors
Updated on Oct 19, 2022
Latest Version
0.15.0
Package Id
@dashevo/dp-services-ctl@0.15.0
Unpacked Size
173.16 kB
Size
33.21 kB
File Count
101
NPM Version
8.15.0
Node Version
16.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
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:
1npm install @dashevo/dp-services-ctl
Drive service starts a bunch of related services:
DAPI service starts all DP services:
1// Export service(s) 2const { startMongoDb } = require('@dashevo/dp-services-ctl'); 3// This is optional. Default options listed in options class 4const options = { 5 port: 27017, // mongoDB port 6}; 7 8// Start service 9const mongo = await startMongoDb(options); 10 11// Get mongo client 12const client = await mongo.getClient(); 13 14// Stop mongoDB 15await mongo.remove();
Use many
method to start several instances:
1const { startMongoDb } = require('@dashevo/dp-services-ctl'); 2 3// This is optional. Default options listed in options class 4const options = { 5 port: 27017, // mongoDB port 6}; 7 8// Start two services 9const mongoNodes = await startMongoDb.many(2,options); 10 11// Get peer IDs 12const [client1, client2] = await Promise.all( 13 mongoNodes.map(mongo => mongo.getClient()), 14); 15 16// Stop mongoDB nodes 17await Promise.all( 18 mongoNodes.map(mongo => mongo.remove()), 19);
Each service has default options which can be overwritten in three ways:
start[service]
or create[service]
methodsstart[service]
or create[service]
methodssetDefaultCustomOptions
method of options classServices Mocha hooks provide automation for your mocha tests:
before
)beforeEach
, afterEach
)after
)1// Export service(s) with mocha hooks 2const { mocha: { startMongoDb } } = require('@dashevo/dp-services-ctl'); 3 4describe('Test suite', () => { 5 let mongoClient; 6 7 startMongoDb().then(mongo => () => { 8 mongoClient = mongo.getClient(); 9 }); 10 11 it('should do something', async () => { 12 const collection = mongoClient.db('test').collection('syncState'); 13 const count = await collection.countDocuments({}); 14 15 expect(count).to.equal(0); 16 }); 17});
Feel free to dive in! Open an issue or submit PRs.
MIT © Dash Core Group, Inc.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 15/26 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
52 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More