- Make sure you create
logs
folder in the root directory as well asrestart.txt
andcrash_logs.txt
inside it.
forever start ./src/bot.js
forever -o out.log -e err.log start ./src/bot.js
$ forever stop ./src/bot.js
$ forever restart ./src/bot.js
$ forever list
$ forever stopall
https://shiffman.net/a2z/bot-ec2/
ssh -i noob-dev-oracle-cloud.key ubuntu@<server-public-ip-address>
- To start the bot, run:
pm2 start bin/run.sh
. Make sure to setup PM2 beforehand.
- IMPORTANT: Make sure you are using nodejs v16.14.0 or above (Wasted more than an hour the other day because of this)