File: lifecycle_events.rb

package info (click to toggle)
ruby-sinatra 4.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,944 kB
  • sloc: ruby: 17,702; sh: 25; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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