Skip to content

Instantly share code, notes, and snippets.

@phemmer
Created December 7, 2015 05:13
Show Gist options
  • Select an option

  • Save phemmer/d45712922156d408abb4 to your computer and use it in GitHub Desktop.

Select an option

Save phemmer/d45712922156d408abb4 to your computer and use it in GitHub Desktop.
ruby rack hello world
#!/usr/bin/ruby
require 'rack'
require 'rack/server'
class HelloWorld
def response
[200, {}, 'Hello World']
end
end
class HelloWorldApp
def self.call(env)
HelloWorld.new.response
end
end
Rack::Server.start :app => HelloWorldApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment