Skip to content

Instantly share code, notes, and snippets.

@joshmn joshmn/
Last active Jun 5, 2018

What would you like to do?
this rack app will return whatever http status code you want, too.
# Make sure this is named
# install the gem with
# $ gem install rack
# Usage: rackup
require 'rack'
run ->(env) { [(env['REQUEST_PATH'][-3, 3].to_i.nonzero? ? env['REQUEST_PATH'][-3, 3].to_i : 200), {"Content-Type" => "text/html"}, [' ']] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.