Last active
March 29, 2016 03:09
-
-
Save xiejiangzhi/41c33598c86a4617ee18 to your computer and use it in GitHub Desktop.
ruby test web
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, this is a rack app.']] | |
end | |
port = ENV['PORT'] || 8080 | |
Rack::Handler::WEBrick.run app, Port: port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment