Demo Instance

lusis edited this page Feb 10, 2011 · 3 revisions

Openredis and Heroku

I've created a demo instance of Noah running on Heroku and using openredis. Many thanks to Michel Martens (soveran) for jumping right up and getting me in the beta. You can access the demo instance here:

http://noah-demo.heroku.com

Loading it up will give you the Noah sample greeting page. I plan on allowing that as an override in config.ru down the road.

Warnings on the demo

Fair warning, the demo may or may not have any data in it. I plan on redeploying each time I push a new build to github and when I do that, I'll repopulate with the sample data.

Testing the demo via CLI

Feel free to hit the demo API endpoints as documented in the wiki here under proposed API

Add a new application

curl -X PUT -d '{"name":"noah-demo-app"}' http://noah-demo.heroku.com/a/noah-demo-app

{"name":"noah-demo-app","result":"success","action":"create","id":"4"}

Add a new configuration

curl -X PUT -d '{"format":"string","body":"http://noah-demo.heroku.com"}' http://noah-demo.heroku.com/c/noah-demo-app/url

{"dependencies":"updated","result":"success","action":"create","application":"noah-demo-app","id":"6","item":"url"}

Do it yourself

If you want to deploy your own demo instance to heroku, you need TWO files - config.ru and a Gemfile. The config.ru looks like this:

require 'rubygems'
require 'sinatra'
require 'noah'
## Uncomment the following to hardcode a redis url
ENV['REDIS_URL'] = "<my openredis url>"
noah = Noah::App.new do
  set :run, false
  set :environment, :production
end  
run noah

There's nothing else to it.