Sha256: 60d4c42dbc794a9680a77a35b09fa33c0bb775760a7b6bdef157bf92cefd5147

Contents?: true

Size: 326 Bytes

Versions: 7

Compression:

Stored size: 326 Bytes

Contents

#!/usr/bin/env ruby -I ../lib -I lib
# frozen_string_literal: true

require 'sinatra'

get('/') do
  'This shows how lifecycle events work'
end

on_start do
  puts "=============="
  puts "  Booting up"
  puts "=============="
end

on_stop do
  puts "================="
  puts "  Shutting down"
  puts "================="
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sinatra-4.1.1 examples/lifecycle_events.rb
sinatra-4.1.0 examples/lifecycle_events.rb
sinatra-4.0.0 examples/lifecycle_events.rb
sinatra-3.2.0 examples/lifecycle_events.rb
sinatra-rack-3-commonlit-3.0.6 examples/lifecycle_events.rb
sinatra-rack-3-commonlit-3.1.0 examples/lifecycle_events.rb
sinatra-3.1.0 examples/lifecycle_events.rb