如何使用 PM2 运行 MongoDB?我正在使用 Linux VPS (CentOS),我尝试这样做:
pm2 mongod
Run Code Online (Sandbox Code Playgroud)
^ 可行,但问题是我需要绑定 IP 和 DBPath 名称
pm2 mongod -dbpath /home/[ommitted]/data/db --bind_ip [ommitted] -auth
Run Code Online (Sandbox Code Playgroud)
^ 但由于 PM2 标志,这不起作用。那么我如何使用 PM2 运行它,或者至少让它在我关闭终端时不会关闭