pm2 start index.js —name app_name
pm2 save
pm2 startup(按照CLI提示复制相应命令并执行)

参考: https://pm2.io/doc/en/runtime/guide/startup-hook/#installation