Javascript bots created by TrashBytes (Formerly). Updates and maintenance by Intervención.
--
#REQUIREMENTS
openssl node npm (bundled with node) pm2 (npm install pm2) static hostname port forwarding (8443) SSL cert (script included)
==========================
#PREREQUISITES
- Create a bot with @botfather (this will be your development-branch, it doesn't matter what you call it)
- Enter it's token in token/gem-dev.json, don't touch the rest just yet
==========================
#INSTALLATION & START
-
install node and openssl
apt-get blah blah
-
use npm to install pm2 globally
sudo npm install -g pm2
-
edit cert/generate_key.sh with your information
-
execute it (creates two files, leave them where they are)
chmod +x generate_key.sh bash generate_key.sh
-
enable port forwarding on port 8443
-
use pm2 to launch the server+bot (and keep it alive)
pm2 start app.json
If you want pm2 to automatically restart itself and the bot on Ubuntu reboot use following commands once: > pm2 save > pm2 startup
==========================