Quick Tips: Using Remote mySQL for Heroku NodeJS API

Heroku makes deploying applications effortless -- if you use their rate-limited database. Then things get a little more complicated when you want to use your own database. Just barely though.

I'll show you in a couple steps how to get your remote mySQL server connected to your Heroku app.

I decided to test out Heroku for one of our Node based apps. Our app is simple Express API that queries a remote mySQL database. It uses the node-mysql library to connect to the DB. If we're on the local environment, we connect to the localhost, if production, we use live server credentials.

We ❤️ good emails

Stay Regular is a design agency located in Southern California that specializes in cannabis design and media. Our focus is to elevate the standard of design associated with the cannabis community. We cater the digital experience around the end user, developing intuitive and engaging media and applications. We bring your ideas to life - for companies at every stage of growth, from startups to publicly-traded companies.