Created
September 9, 2016 03:12
-
-
Save waynerobinson/f0a2fda953ac312835eb496e8dcd7623 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'webrick' | |
server = WEBrick::HTTPServer.new :Port => 8000 | |
trap 'INT' do server.shutdown end | |
server.mount_proc '/' do |req, res| | |
res.body = 'Hello, world!' | |
end | |
server.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment