How to use pm2 startup command on Mac?

旧时模样 提交于 2020-06-12 04:14:28

问题


My question is the same as How to use pm2 startup command on Debian platform? but i need to make it start on Mac OS (darwin)

I only found a very bref documentation $ pm2 startup <ubuntu|centos|gentoo|systemd>

What can I do?


回答1:


PM2 now has darwin option for startup, so running:

pm2 startup darwin 

should work.

Also checkout this commit: 1. Make platform auto detecting. 2. Support darwin startup script. So right now, you can just call:

pm2 startup

and the script will recognise your OS.

NOTE: I'm currently having issues on Yosemite as the launchd gives me an error. You can find more info (and solution that works for me) here: darwin startup script fix on yosemite #989

Also if you can test it in your environment and support this pull request, it would be great:)



来源:https://stackoverflow.com/questions/26664282/how-to-use-pm2-startup-command-on-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!