Created
August 11, 2012 14:10
-
-
Save leonardteo/3324737 to your computer and use it in GitHub Desktop.
Ruby on Rack
This file contains hidden or 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
# Sets up and runs a simple Rack server using WEBrick | |
require 'rack' | |
class HelloWorld | |
def call(env) | |
[200, {"Content-Type" => "text/html"}, ["Hello Rack!"]] | |
end | |
end | |
Rack::Server.start(:app => HelloWorld.new, :Port => 9292, :server => 'WEBrick') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment