Application configuration can be a pain. Modern web apps don’t live on dedicated boxes, they run on VPSes somewhere in the amorphous “cloud”, and keeping configuration out of your application’s repository can seem like more trouble than it’s worth. Fortunately, The Twelve-Factor App provides a set of standards for keeping web apps sane, and one of those guidelines advises keeping configuration in the environment.
Envy is the declarative bridge between Racket code and the outside world of the environment.
Heroku is a “platform as a service” that provides an incredibly simple way to deploy simple internet applications, and I take liberal advantage of its free tier for testing out simple applications. It has support for a variety of languages built-in, but Racket is not currently among them. Fortunately, Heroku provides an interface for adding custom build processes for arbitrary types of applications, called “buildpacks”. I’ve built one for Racket apps, and with just a little bit of configuration, it’s possible to get a Racket webserver running on Heroku.
So, I have a blog now. It’s a simple static blog, but what’s unique about it is that it’s powered by Racket; specifically, it uses Greg Hendershott’s fantastic Frog tool. I’ve taken this and moulded it to my tastes to build my blog, including configuring automatic deployment via Travis CI, so my blog is always up-to-date.