Skip to content

Instantly share code, notes, and snippets.

@codesword
Created June 5, 2016 16:01
Show Gist options
  • Save codesword/48376016e0c40f9c212886f91e1b4bbb to your computer and use it in GitHub Desktop.
Save codesword/48376016e0c40f9c212886f91e1b4bbb to your computer and use it in GitHub Desktop.
require "rack/handler/puma"
class AnotherRackApp
def call(env)
http_verb = env["REQUEST_METHOD"]
path = env["PATH_INFO"]
status = 200
headers = {"Content-Type" => "text/html"}
body = ["got #{http_verb} <b>request</b> from <strong>#{path}</strong> path"]
[status, headers, body]
end
end
app = AnotherRackApp.new
Rack::Handler::Puma.run app, Port: 9292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment