There is a problem and need advice/solution how to solve it.
You all know nvm, a great tool to select a node.js version. I have it installed on my server for the nodejs user. But pm2 during server restart runs on root user and currently does NOT tell nvm to load the default node.js version.
How do you do this? I think, in pm2-init.sh under init.d we need to add a pre-run script to call nvm first?
There is a problem and need advice/solution how to solve it.
You all know nvm, a great tool to select a node.js version. I have it installed on my server for the nodejs user. But pm2 during server restart runs on root user and currently does NOT tell nvm to load the default node.js version.
How do you do this? I think, in pm2-init.sh under init.d we need to add a pre-run script to call nvm first?