Sha256: 3f408bb87e2b45dc6d58d093a390393669c61b81d016794e00fdf5768e0f10fa

Contents?: true

Size: 773 Bytes

Versions: 11

Compression:

Stored size: 773 Bytes

Contents

# Run with: rackup -s thin
# then browse to http://localhost:9292
# Or with: thin start -r config.ru
# then browse to http://localhost:3000
# 
# Check Rack::Builder doc for more details on this file format:
#  http://rack.rubyforge.org/doc/classes/Rack/Builder.html

require File.dirname(__FILE__) + '/../lib/thin'

app = proc do |env|
  # Response body has to respond to each and yield strings
  # See Rack specs for more info: http://rack.rubyforge.org/doc/files/SPEC.html
  body = ['hi!']
  
  [
    200,                                        # Status code
    {
      'Content-Type' => 'text/html',            # Reponse headers
      'Content-Length' => body.join.size.to_s
    },
    body                                        # Body of the response
  ]
end

run app

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
thin-0.6.4-x86-mswin32-60 example/config.ru
thin-0.6.4 example/config.ru
thin-0.6.3 example/config.ru
thin-0.7.0-x86-mswin32-60 example/config.ru
thin-0.6.3-x86-mswin32-60 example/config.ru
thin-0.8.1 example/config.ru
thin-0.7.1-x86-mswin32-60 example/config.ru
thin-0.8.0 example/config.ru
thin-0.8.2 example/config.ru
thin-0.7.0 example/config.ru
thin-0.7.1 example/config.ru