This is a personal URL shortener bot built using Twilio API in nodejs. The backend database used is postgreSQL.
- Head over to Twilio's website
- Create an account and login if you haven't and configure your number with the Twilio whatsapp sandbox
- Follow the instructions you find on the website
- Now head over to Heroku to deploy the bot. Sign up if you haven't already and login
- Create an application and add heroku-postgres as a resource
- Alright now your database and heroku is all set up and ready
- Deploying the bot
-
Clone this repository
-
Create a .env file containing the following information. (Ignore the #Required and #Optional lines)
#Required ~ Important ACCOUNT_SID=<The SID that you can get from Twilio dashboard> AUTH_TOKEN=<The SID that you can get from Twilio dashboard> DOMAIN=<Put your custom domain link here or just put the herokuapp link> #Optional ~ meh PORT=<Custom PORT number> [Not necessarily required]
-
Push code to heroku using heroku cli or deploy the app by connecting the Github repo to Heroku.
-
- Test by sending a link to the bot