This code is running here until I accidentally Holly
Created
April 20, 2012 14:25
-
-
Save rxbynerd/2429046 to your computer and use it in GitHub Desktop.
Basic demonstration of a dynamic web page
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
# this is a dynamic route | |
get "/" do | |
"The time is " + Time.now.inspect | |
end | |
# this is a static route | |
get "/james" do | |
"i crashed it" | |
end |
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" | |
require "./app.rb" | |
run Sinatra::Application |
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
thin: | |
thin start --port 5075 --address 127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment