Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Heaton committed May 21, 2016
1 parent ee5ac25 commit fa50344
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ gem 'rack'
gem 'sinatra'
gem 'sinatra-logger'
gem 'redis'
gem 'httparty'
6 changes: 0 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
GEM
remote: https://rubygems.org/
specs:
httparty (0.13.7)
json (~> 1.8)
multi_xml (>= 0.5.2)
json (1.8.3)
multi_xml (0.5.5)
rack (1.6.1)
rack-protection (1.5.3)
rack
Expand All @@ -22,7 +17,6 @@ PLATFORMS
ruby

DEPENDENCIES
httparty
rack
redis
sinatra
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# blog-index

Sinatra app to serve index page for pixelhandler.com from Redis

sudo su - deploy
rackup -E production -p 4567 -s thin -D
10 changes: 0 additions & 10 deletions app.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'sinatra'
require 'redis'
require 'httparty'

def bootstrap_index(index_key)
redis = Redis.new(:password => "#{ENV['REDIS_SECRET']}")
Expand All @@ -9,16 +8,7 @@ def bootstrap_index(index_key)
redis.get("#{project}:index:#{index_key}")
end

get '/sitemap.xml' do
content_type 'text/xml'
'<?xml version="1.0" encoding="UTF-8"?><url>sitemap.xml</url>'
#url = 'https://s3.amazonaws.com/cdn.pixelhandler.com/sitemap.xml'
#resp = HTTParty.get(url)
#resp.body
end

get '/*' do
content_type 'text/html'
#"<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Test</h1></body></html>"
bootstrap_index(params[:index_key])
end

0 comments on commit fa50344

Please sign in to comment.