Skip to content

Instantly share code, notes, and snippets.

@DamirSvrtan
Forked from shime/ZR.rb
Created May 15, 2012 01:40
Show Gist options
  • Save DamirSvrtan/2698456 to your computer and use it in GitHub Desktop.
Save DamirSvrtan/2698456 to your computer and use it in GitHub Desktop.
ZR
require 'sinatra'
require 'rubygems'
require 'httparty'
require 'net/http'
require 'base64'
set :dump_errors, false
class Representative
include HTTParty
end
get '/' do
begin
@var = Representative.get('http://0.0.0.0:4569/')
erb :index
rescue Exception => msg
puts msg.message
erb :sheet # ili ovdje samo msg.message pa će ti ispisat error message u viewu samo
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment