Last active
August 29, 2015 14:26
-
-
Save chadjemmett/93f2bccbd69353875a96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
#this is the number that goes up or down in value | |
$thing = 1 | |
#this gets the index page | |
# | |
get "/" do | |
erb :index | |
#the link to this gist code => https://gist.github.com/ceejaay/801c2e5de59710b1a402#file-index-erb | |
end | |
#this is the put request to down vote | |
put "/thing2" do | |
$thing = $thing - 1 | |
redirect back | |
end | |
#this is the put request to up vote | |
put "/thing1" do | |
$thing += 1 | |
redirect back | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment