Skip to content

Instantly share code, notes, and snippets.

@dotimpact
Created February 15, 2016 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotimpact/2d92bc940017030bc1b1 to your computer and use it in GitHub Desktop.
Save dotimpact/2d92bc940017030bc1b1 to your computer and use it in GitHub Desktop.
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