mechanical bee logo

about us

We make web applications for ourselves and for clients. or learn more.


Geek fun: building a lil' node.js app

We recently wrote a little service in Node.js and deployed it on Heroku’s Cedar stack. All it does is return UPS shipping rates when we do an http get with certain parameters. So instead of hitting UPS directly every time an item page loads, we hit the node app and it either pulls the rate out of Redis or asks UPS, meaning that shipping rates should come up a lot faster. We didn’t really need to spin up a Node app for this but hey, this is how we have fun :D.

It’s a pretty basic app but...

Why we don't use the Heroku SendGrid addon

TL;DR: When you use Heroku’s SendGrid add-on, your account is a sub-user of the main Heroku account and doesn’t get manually provisioned or tiered based on goodness like solo SendGrid accounts. This means that the IP group your in is more likely to be populated with miscreants whose bad behavior decreases your own deliverability. So if you’re not a miscreant and don’t want to get lumped in with other miscreants, you should just sign up for a normal SendGrid account—the pricing/plans are the same or better anyways.

Using SendGrid via the Heroku addon is brain-dead easy

Using a...

How to find your SendGrid login when using the Heroku addon

If you’re using the Heroku SendGrid addon, they’ll create account credentials for you. e.g. a username and password. Sometimes you want to either do some configuration or more frequently, log in to the SendGrid site to see stats and activity and stuff.

heroku config

and you’ll see a bunch of config vars. The ones you’re looking for are:


Omniauth, openid, heroku, and https

We recently added the option to log in or sign up with Facebook, Twitter, or Google using the handy omniauth gem.

Facebook and Twitter went swimmingly. We had already been integrating with Facebook and Twitter so that people could tweet or post to Facebook to tell their friends about the items they’re giving away. Adding a sign up/log in pathway was just an extension of that functionality.

But we ran into a problem with Google and OpenID: they worked fine in development but kept failing with “invalid credentials” in production.

There are two main differences with our production environment: