Running The Bot:
create a .env file with the following details:
MY_TOKEN=TELEGRAM_BOT_TOKEN
MY_CHAT_ID=SERVER_CHAT_ID
MY_TASK_CREATED_SQS=PAID_TASK_SQS_PATH_URL
MY_TASK_PAID_SQS=PAID_EVENT_SQS_PATH_URL
TASK_CREATED_VIDEO_URL=Video_Url
TASK_PAID_VIDEO_URL=Video_Url
TASK_BASE_URL=BASE_URL
EMAIL_SERVICE_SQS=EMAIL_SERVICE_SQS_PATH_URL
[email protected]
AWS_ACCESS_KEY_ID=ACCESS_KEY
AWS_SECRET_ACCESS_KEY=SECRET_KEY
AWS_REGION=REGION
AWS_ENDPOINT_SQS=ENDPOINT_SQS
AWS_ENDPOINT_SES=ENDPOINT_SES
WEBSITE_URL=https://v2.gib.work/tasks/
Build The docker Image
docker build -t notification-app:latest .
Run the docker Image:
docker compose up
In the server.js you can find the actual implementation of this at this switch case
- Subject: "New Service Request Posted"
- Template:
new-service-request
- Data Object:
{ "username": "string", "viewServiceLink": "string" }
- Subject: "Your Service Request Has Been Approved!"
- Template:
service-request-approved
- Data Object:
{ "username": "string", "serviceTitle": "string", "viewServiceLink": "string" }
- Subject: "Service Request Completed - Time to Withdraw Your Earnings!"
- Template:
service-request-completed
- Data Object:
{ "username": "string", "serviceTitle": "string", "viewServiceLink": "string" }