Added IronCache (not used yet).

Using copy of reverse proxy so can get error response.
This commit is contained in:
Travis
2012-12-31 16:20:45 -08:00
parent 9795fb207d
commit 2a2cf3a3d6
3 changed files with 54 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
require 'rest'
require 'sinatra'
# The backend would do this part before execute the worker
########################################################
rest = Rest::Client.new
rest.logger.level = Logger::DEBUG
@@ -10,10 +12,9 @@ puts "public dns name: #{public_dns}"
port = rand(50000..55000)
puts "port: #{port}"
response = rest.post(
# "http://localhost:8080/",
"http://router.irondns.info/",
"http://router.irondns.info/?project_id=#{params[:project_id]}&token=#{params[:token]}",
headers: {"Iron-Router"=>"YES!"},
body: {"host"=>"routertest.irondns.info", "dest"=>"#{public_dns}:#{port}"})
puts "body:"
@@ -21,6 +22,9 @@ puts response.body
STDOUT.flush
# Now we start the actual worker
##################################################################3
ENV['PORT'] = port.to_s # for sinatra
my_app = Sinatra.new do
set :port, port