Created
January 1, 2016 10:40
-
-
Save johnlinvc/3b6e01eb75fe4c60b736 to your computer and use it in GitHub Desktop.
ruby rack echo server
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
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