Created
August 24, 2013 21:38
-
-
Save kawasako/6330550 to your computer and use it in GitHub Desktop.
webrick simple 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 'webrick' | |
include WEBrick | |
s = HTTPServer.new( | |
:Port => 8000, | |
:DocumentRoot => '.' | |
) | |
trap("INT"){ s.shutdown } | |
s.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment