Node.js PM2 Arguments
pm2 시작할 때 args 넘기기
pm2 start --name MyProudApplication /home/pi/scammer/app.js -- arg1 arg2 arg3
args 가져오는 예제
const argv = process.argv.slice(); argv.shift(); // remove node path argv.shift(); // remove path
고급 메모장
pm2 시작할 때 args 넘기기
pm2 start --name MyProudApplication /home/pi/scammer/app.js -- arg1 arg2 arg3
const argv = process.argv.slice(); argv.shift(); // remove node path argv.shift(); // remove path