Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

(Chore) improve dev scripts#809 #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,43 @@ module.exports = {
out_file: "logs/gun.out.log",
error_file: "logs/gun.err.log",
pid_file: "logs/gun.pid"
}
},
{
name: 'good-dapp-test-watch',
script: 'npm',
args: 'run start:dapp-test-watch',
env: {
...readEnv('packages/dapp/.env.test'),
},
merge_logs: true,
out_file: 'logs/dapp-test.out.log',
error_file: 'logs/dapp-test.err.log',
pid_file: 'logs/dapp-test.pid'
},
{
name: 'good-server-test-watch',
script: 'npm',
args: 'run start:server-test-watch',
env: {
...readEnv('packages/server/.env.test'),
},
merge_logs: true,
out_file: 'logs/server-test.out.log',
error_file: 'logs/server-test.err.log',
pid_file: 'logs/server-test.pid'
},
{
name: "good-blockchain-test",
script: "npm",
args: "run start:blockchain-test",
env: {
...readEnv("packages/contracts/.env.test"),
},
merge_logs: true,
out_file: "logs/blockchain-test.out.log",
error_file: "logs/blockchain-test.err.log",
pid_file: "logs/blockchain-test.pid"
},
]
};

Expand Down
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ npm run linkcontracts
npx pm2 start ecosystem.config.js --only good-gun
npx pm2 start ecosystem.config.js --only good-server
npx pm2 start ecosystem.config.js --only good-dapp
npx pm2 start ecosystem.config.js --only good-blockchain-test
sleep 30
npx pm2 start ecosystem.config.js --only good-dapp-test-watch
npx pm2 start ecosystem.config.js --only good-server-test-watch

pm2 logs

# please wait contract deploying and after that please run
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
"info:server": "pm2 describe good-server",
"info:gun": "pm2 describe good-gun",
"status": "pm2 list /good-/",
"start": "pm2 start --only good-blockchain,good-gun && sleep 60 && npm run linkcontracts && pm2 start --only good-server,good-dapp && pm2 logs",
"start": "pm2 start --only good-blockchain,good-gun && sleep 60 && npm run linkcontracts && pm2 start --only good-server,good-dapp && pm2 start --only good-dapp-test-watch && pm2 start --only good-server-test-watch && pm2 logs",
"start:all": "run-p start:blockchain start:dapp start:server",
"start:blockchain": "lerna run start --scope @gooddollar/goodcontracts --stream",
"start:blockchain-test": "lerna run ganache:for-test --scope @gooddollar/goodcontracts --stream",
"start:dapp": "lerna run web:local --scope @gooddollar/gooddapp --stream",
"start:dapp-test-watch": "lerna run test:web-watch --scope @gooddollar/gooddapp --stream",
"start:server": "lerna run dev:local --scope @gooddollar/goodserver --stream",
"start:server-test-watch": "lerna run test:watch --scope @gooddollar/goodserver --stream",
"start:gun": "lerna run dev:local --scope @gooddollar/goodgun --stream",
"Xpoststart": "lerna run deploy --scope @gooddollar/goodcontracts --stream",
"stop": "pm2 stop /good-/ --silent || true",
Expand Down