DEV Community

Discussion on: Run your Node.js application on a headless Raspberry Pi

Collapse
 
bogdaaamn profile image
Bogdan Covrig

yep, in order to pass node arguments to pm2 you have to use the --node-args argument. like

pm2 start resources/app/main.js --node-args="--dataPath=$HOME/foundrydata" 

Or you can add it in the pm2 JSON file. You can read more in the tutorial or in the pm2 docs.