postrank-labs/goliath — pull request #263 by jsaak (2013-10-24 10:51:19+00:00)
Title: added on_exit hook to api

i could not find this hook
it executes when the server get an INT or TERM signal

what i wanted to accomplish is to marshal out data when the server stops
is there a better way to do it?

here is how to use it:
```
require 'goliath'

class HelloWorld < Goliath::API
def response(env)
[200, {}, "hello world"]
end

def on_exit
puts 'goodbye world'
end
end
```