Created
February 12, 2014 17:03
-
-
Save cromwellryan/8959807 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
# hello_world.rb | |
require 'rack' | |
require 'rack/server' | |
class HelloWorldApp | |
def self.call(env) | |
[ 200, {}, ['Hello World'] ] | |
end | |
end | |
run HelloWorldApp |
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 'rack' | |
require 'rack/server' | |
class HelloWorldApp | |
def self.call(env) | |
[ | |
200, #Status Code | |
{}, #Headers | |
['Hello World'] #Body | |
] | |
end | |
end | |
Rack::Server.start :app => HelloWorldApp, Port: 9999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment