Last active
December 17, 2015 07:59
-
-
Save kfigiela/5577297 to your computer and use it in GitHub Desktop.
Test app for lab
This file contains 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
#!/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