Skip to content

Instantly share code, notes, and snippets.

@johnlinvc
Created January 1, 2016 10:40
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 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