Created
February 15, 2016 01:34
-
-
Save dotimpact/2d92bc940017030bc1b1 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
run lambda {|env| | |
request = Rack::Request.new(env) | |
if request.path =~ /\/login$/ | |
json = open("response/login.json").readlines.join | |
Rack::Response.new( json, 200, { | |
"Content-Type" => "application/json" | |
}) | |
else | |
Rack::Response.new("not found", 404); | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment