Nezumi - The iPhone app for Heroku 9

Posted by Marshall Huss Sun, 27 Dec 2009 02:17:00 GMT

Nezumi

I am proud to announce something I've been working on the past few weeks. Nezumi lets you administer your Ruby apps hosted on Heroku.

weretwoguys

Static Sites on Heroku in Two Lines 8

Posted by Marshall Huss Mon, 14 Dec 2009 02:39:00 GMT

Sometimes you just have a static website with one or a couple pages. You might even have a shared hosting plan or even a VPS but who wants to go through the hassle of that when you could use Heroku?

Here is a simple way to host your static site and cache it on Heroku using a Rack app.

Here is how your folder should be organized:

In the config.ru file add the following:

This assumes that your template uses relative references to the images and stylesheets. Go ahead and deploy the app, if you are not sure how to deploy to Heroku check out their quickstart guide.

Now since Heroku uses a HTTP Accelerator we should take advantage of it. If you noticed in the config.ru file we set the Cache-Control header to 86400 seconds (24 hours). This tells the accelerator to go ahead and cache the page. The accelerator already caches any Rack::File for 12 hours as well meaning all your stylesheets and images will also be cached.

To confirm it's working, let's take a look at the HTTP headers returned from your site. The Age header indicated that it's being served from the HTTP cache.

And there you go, a static site being served in Heroku's cloud completely cached and for free.