When we are running multiple node services in a single machine, its becoming hard to restart one service with id as id is a sequence number allocated in order by PM2. So instead using the id is it possible to restart the process using process name?
当我们在一台机器中运行多个节点服务时,很难使用id重新启动一个服务,因为id是由PM2按顺序分配的序列号。因此,是否可以使用id使用进程名重新启动进程?
I start my services with the service name using following command:
我使用以下命令启动服务名称:
pm2 start index.js --name my-service-name
I want to restart them using the name 'my-service-name' so that I can automate it using a script.
我想使用名称“my-service-name”重新启动它们,以便使用脚本实现自动化。