Monitoring a folder with this bot and when this folder would have a file, my bot will take this file and send it as email to a list of emails from a txt
|-- controller
|--email.py
|--functions.py
|-- .env
|-- database
|-- _init_.py
|-- listaEmails.txt
|-- requirements.txt
Required:
Python 3.7.5 or more
Node 10x
Tips about Linux's Environment:
Before everything you need to rum this command:
sudo apt update
Install Python 3:
sudo apt-get install python3
Install pip 3:
sudo apt-get install python3-pip
Install Node:
sudo apt install nodejs
Install npm:
sudo apt install npm
Create specific tables in your database,executing script below:
script_bd.sql
Install all python's dependencies with script below:
pip install -r requiriments.txt
pip3 install -r requiriments.txt(linux)
Install lib "pm2" on your node.js with NPM:
npm install -g pm2
After every installations you can execute the bot,at directory's project with console CMD:
pm2 start _init_.py
if your linux has other versions installed, you need to use:
pm2 start _init_.py --interpreter python3
#TIPS PM2#
List all bots:
pm2 list
Stop a bot:
pm2 stop _init_.py
Show bot's log:
pm2 logs _init_.py
There are many commands on PM2 you can see at all in its documentation https://www.npmjs.com/package/pm2.
MIT © Paulo Mota