bae4d50087
-The update_explorer.js script has been improved with better spacing and the ability to restart the explorer automatically to ensure new changes take effect immidiately (works with npm start, pm2 and forever) -The code to compile scss to css has been moved from the prestart script into its own compile_css.js script which is now called from the update-explorer.js script to apply css changes after update -The cluster code now handles a custom restart msg which is used to restart the explorer from the update explorer process -Pm2 and Forever are now referenced by the name 'explorer' instead of ./bin/instance or ./bin/cluster [SEE IMPORTANT NOTE BELOW] -Added reload/restart scripts to the package.json for pm2 and forever -Pm2 and forever now write a pid file to the tmp directory when started. NOTE: Forever is now started from the prestart script due to a bug in forever that prevents the pid from being written to a different directory without the absolute path -Fixed a bug which caused the prestart script to be run twice when starting the explorer with `npm start` -The cluster code now accepts a numeric argument to force a specific number of instances to be loaded -The `npm run start-instance` cmd now loads using the cluster code with a single instance -The is_locked function now accepts an optional 'silent' argument to prevent displaying msgs while checking for pid/lock files -Added some process.exit statements to the stop_explorer.js file -Updated the README with cmd changes from package.json and updated description of the "Update Explorer Script" IMPORTANT NOTE: It is strongly recommended to stop the explorer before performing this update. If the explorer is running while you perform this update, you will need to stop and restart the explorer for this update to fully take effect. Because of the changes in this commit, stopping the explorer using the built-in pm2 and/or forever stop cmds will not work and you will need to type out the full stop cmd this one time only, and going forward from now on you should no longer need to even stop the explorer for any update as it is now built into the update cmd. If running using pm2 and you cannot stop the explorer, you can use stop using the following full cmd syntax: Windows: pm2 stop ./bin/instance Linux and other OS's: node node_modules/pm2/bin/pm2 stop ./bin/instance If running using forever and you cannot stop the explorer, you can use stop using the following full cmd syntax: All OS's: node node_modules/forever/bin/forever stop ./bin/cluster
57 lines
2.3 KiB
JSON
57 lines
2.3 KiB
JSON
{
|
|
"name": "explorer",
|
|
"version": "1.100.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"start": "node --stack-size=10000 ./bin/cluster",
|
|
"stop": "node ./scripts/stop_explorer.js",
|
|
"start-instance": "npm run prestart && node --stack-size=10000 ./bin/cluster 1",
|
|
"start-forever": "npm run prestart \"forever\"",
|
|
"stop-forever": "forever stop \"explorer\"",
|
|
"reload-forever": "forever restart \"explorer\"",
|
|
"start-pm2": "npm run prestart \"pm2\" && pm2 start ./bin/instance -i 0 -n explorer -p \"./tmp/pm2.pid\" --node-args=\"--stack-size=10000\"",
|
|
"start-pm2-debug": "npm run prestart \"pm2\" && pm2 start ./bin/instance -i 0 -n explorer -p \"./tmp/pm2.pid\" --node-args=\"--stack-size=10000\" && pm2 logs",
|
|
"stop-pm2": "pm2 stop explorer",
|
|
"reload-pm2": "pm2 reload explorer",
|
|
"test": "node ./node_modules/jasmine/bin/jasmine.js test/*Spec.js",
|
|
"prestart": "node ./scripts/prestart.js",
|
|
"sync-blocks": "node ./scripts/sync.js index update",
|
|
"sync-markets": "node ./scripts/sync.js market",
|
|
"sync-peers": "node ./scripts/sync.js peers",
|
|
"sync-masternodes": "node ./scripts/sync.js masternodes",
|
|
"check-blocks": "node ./scripts/sync.js index check",
|
|
"reindex": "node ./scripts/sync.js index reindex",
|
|
"reindex-rich": "node ./scripts/sync.js index reindex-rich",
|
|
"reindex-txcount": "node ./scripts/sync.js index reindex-txcount",
|
|
"reindex-last": "node ./scripts/sync.js index reindex-last",
|
|
"create-backup": "node ./scripts/create_backup.js",
|
|
"restore-backup": "node ./scripts/restore_backup.js",
|
|
"delete-database": "node ./scripts/delete_database.js",
|
|
"update-explorer": "node ./scripts/update_explorer.js"
|
|
},
|
|
"dependencies": {
|
|
"async": "^3.2.4",
|
|
"bad-words": "^3.0.4",
|
|
"body-parser": "^1.20.0",
|
|
"cookie-parser": "^1.4.6",
|
|
"debug": ">=4.3.4",
|
|
"express": ">=4.18.1",
|
|
"intl": "^1.2.5",
|
|
"jsonminify": "^0.4.2",
|
|
"jstransformer-markdown-it": "^2.1.0",
|
|
"mongodb": "^4.7.0",
|
|
"mongoose": "^6.3.6",
|
|
"morgan": ">=1.10.0",
|
|
"postman-request": "^2.88.1-postman.31",
|
|
"pug": "~3.0.2",
|
|
"qr-image": "^3.2.0",
|
|
"readline-sync": "^1.4.10",
|
|
"sass": "^1.52.3",
|
|
"serve-favicon": "^2.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"forever": "^4.0.3",
|
|
"jasmine": ">=4.2.0",
|
|
"pm2": "^5.2.0"
|
|
}
|
|
} |