Skip to content

Instantly share code, notes, and snippets.

@johnlinvc
Created January 1, 2016 10:40
Show Gist options
  • Save johnlinvc/3b6e01eb75fe4c60b736 to your computer and use it in GitHub Desktop.
Save johnlinvc/3b6e01eb75fe4c60b736 to your computer and use it in GitHub Desktop.
ruby rack echo server
require 'rack'
app = Proc.new do |env|
['200', {'Content-Type' => 'text/html'},
["hello #{env['rack.input'].read}"]]
end
Rack::Handler::WEBrick.run app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment