There is PM2 configuration, /home/foo/someconfig.json
{
"apps": [
{
"name": "foo-main",
"script": "./index.js",
},
{
"name": "foo-bar",
"script": "./bar.js"
},
{
"name": "foo-baz",
"script": "./baz.js"
}
]
}
Most of the time I want to refer to all of the apps under current namespace, e.g.
pm2 restart foo
instead of doing
pm2 restart foo-main foo-bar foo-baz
Bash brace extension cannot be used because apps may run in Windows.
Doing pm2 restart /home/foo/someconfig.json
isn't a good option, because it takes some time to figure out config file path, it may differ between projects and even change its location.
Can foo-*
apps be merged into single foo
app or be referred altogether in another reasonable way?