Created
October 17, 2014 13:48
-
-
Save mizutaki/4f13156310ea7f7b65a3 to your computer and use it in GitHub Desktop.
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 'sinatra' | |
set :title, "My Website" | |
#configureを使って環境依存オプションを指定する | |
configure :development, :test do | |
enable :admin_access | |
end | |
if settings.admin_access? | |
get('/admin') {'welocome to the admin area'} | |
end | |
get '/' do | |
"<h1>#{settings.title}</h1>" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment