Last active
December 16, 2015 00:09
-
-
Save ewalk153/5345332 to your computer and use it in GitHub Desktop.
quick script to accept post data
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 'rubygems' | |
require './post' | |
run Sinatra::Application |
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 'rubygems' | |
require 'sinatra' | |
require 'yaml' | |
set :port, 3000 | |
# can't figure out how to get rid of W, [2013-04-09T14:27:48.512008 #35453] WARN -- : attack prevented by Rack::Protection::HttpOrigin | |
#set :protection, :except => :all | |
post '/{:path}' do | |
puts "Request to #{params[:path]}" | |
puts "Data: #{YAML.dump params}" | |
end |
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
sudo yum update -y | |
sudo yum install -y ruby-devel ruby-rdoc | |
echo "gem: --no-ri --no-rdoc" | sudo tee -a /root/.gemrc | |
curl http://production.cf.rubygems.org/rubygems/rubygems-2.0.3.tgz | tar -xz | |
cd rubygems-2.0.3 | |
sudo ruby setup.rb | |
sudo gem install sinatra rack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment