Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (30 sloc) 865 Bytes



Sinatra Application

ruby app.rb

Rack Application

server {
   listen       80;
   server_name  localhost;
   root /www/contest_app/public;
   passenger_enabled on;


Setup Couch View

This view returns a random record / winner from our couchDB based on the rand column in our database

function(doc) {
  if(doc._rev.charAt(0) == '1') {
    emit(doc.rand, doc);
Jump to Line
Something went wrong with that request. Please try again.