Skip to content

Instantly share code, notes, and snippets.

@bjeavons
Created October 3, 2012 23:26
Show Gist options
  • Save bjeavons/3830545 to your computer and use it in GitHub Desktop.
Save bjeavons/3830545 to your computer and use it in GitHub Desktop.
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