Created
August 10, 2017 18:36
-
-
Save kenichi/91052e53a170576476b922be7764abde to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'sinatra/base' | |
class App < Sinatra::Base | |
get '/' do | |
"hello!\n" | |
end | |
post '/exit' do | |
Thread.new { sleep 1; exit } | |
"exiting!\n" | |
end | |
end | |
at_exit do | |
puts 'here in at_exit 1' | |
end | |
at_exit do | |
puts 'here in at_exit 2' | |
end | |
at_exit do | |
puts 'here in at_exit 3' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment