echolot
v1.0.3
Published
Recursive PM2 json app config file merger
Downloads
2
Maintainers
Readme
echolot.js
Motivation
Imagine you have a nodejs folder situation on your server like this
/var/www
|__ app1
|____ processes.json
|__ app2
|____ processes.json
|__ ...
Each of these processes.json is an instance of a PM2 json application declaration that hold the PM2 decralations for the app of its folder.
In order to start and stop all of them at the same time it would be nice to have a merged.json of all these .json files.
After the build the folder structure will look like
/var/www
|__ app1
|____ processes.json
|__ app2
|____ processes.json
|__ ...
|__ merged.json
And you could start all the processes from the /var/www folder with a simple
pm2 start merged.json
Installation
npm install echolot -g
Usage
echolot /var/www
Where /var/www is the folder that contains all your PM2 apps/subfolders.
To-do
- Handle errors like a grown-up