How do I even begin using Mailgun on Heroku?

Viewed 384

So I have a half decent MERN app that allows user account creation and stuff. I used Mailgun to verify emails and it worked fine while I was in development on localhost. Initially I wanted to deploy the app on my cPanel but as I recently discovered Node.js is not supported on cPanel so now I want to deploy the app to heroku. But after I prepared everything, with environment vars and all, when I do heroku open I get an error: Application Error and when I do heroku logs --tail on the terminal I get an error saying that mailgun apikey is not set although I set it on heroku config vars. After some research I found out that I have to use an addon on heroku, so I added Mailgun addon. But the heroku documentation for this is only for Ruby, check this link https://devcenter.heroku.com/articles/mailgun. I need something to work with Node. So any solution or alternate approach will be very appreciated.

0 Answers
Related