Created
October 3, 2012 23:26
-
-
Save bjeavons/3830545 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 'rubygems' | |
require 'sinatra/base' | |
class MyApp < Sinatra::Base | |
disable :protection | |
get '/' do | |
g = params[:arg] | |
t1 = Thread.new do | |
sleep 4 | |
File.open("data.txt", "a+") do |f| | |
f.puts "got #{g}" | |
end | |
end | |
"pong" | |
end | |
run! if app_file == $0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment