Web Development

/ 0评 / 1/ 最后更新:2021-12-10
pm2开机启动node项目

解决方案

pm2 save
pm2 startup

pm2 save会将当前pm2运行的列表保存在~/.pm2/dump.pm2,方便开机时重新加载
pm2 startup会在/etc/systemd/system目录下生成service文件,开机执行

1

Leave a Reply

Your email address will not be published. Required fields are marked *