Skip to content

Instantly share code, notes, and snippets.

@kfigiela
Last active December 17, 2015 07:59
Show Gist options
  • Save kfigiela/5577297 to your computer and use it in GitHub Desktop.
Save kfigiela/5577297 to your computer and use it in GitHub Desktop.
Test app for lab
#!/usr/bin/ruby
require 'rubygems' # required for ruby 1.8
require 'sinatra'
require 'socket'
host = Socket.gethostname
get '/ok' do
"#{host}\n#{Date.new}"
end
get '/err' do
status 500 # zakomentuj na hoscie C i D
"#{host}\n#{Date.new}"
end
get '/sleep' do
Kernel.sleep(1)
"#{host}\n#{Date.new}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment