Skip to content

Instantly share code, notes, and snippets.

@eiel eiel/app.rb Secret
Created Mar 29, 2014

Embed
What would you like to do?
広島岡山交流会01 でのサンプルコード http://hirosimaokayamarb.doorkeeper.jp/events/8993
require 'action_dispatch'
header = {'Content-Type' => 'text/html'}
routes = ActionDispatch::Routing::RouteSet.new
routes.draw do
get 'hello', to: -> env { [200, header, ['hello']] }
get 'goodbye', to: -> env { [200, header, ['goobye']] }
root to: -> env { [200, header, ['Hiroshima Okayama rb']]}
end
Rack::Handler.default.run routes, Port: 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.