Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (30 sloc) 0.865 kb

Setup

Deployment

Sinatra Application

ruby app.rb

Rack Application

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

CouchDB

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.