-
-
Save eiel/b4c6e39bf9b694022b17 to your computer and use it in GitHub Desktop.
広島岡山交流会01 でのサンプルコード http://hirosimaokayamarb.doorkeeper.jp/events/8993
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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