Created
November 10, 2012 22:35
-
-
Save stengland/4052786 to your computer and use it in GitHub Desktop.
Quickly serve the pwd
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
| #!/usr/bin/env ruby | |
| require 'webrick' | |
| server = WEBrick::HTTPServer.new( | |
| :Port => ARGV.first || 8666, | |
| :DocumentRoot => Dir::pwd | |
| ) | |
| trap 'INT' do server.shutdown end | |
| server.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, might add this to my ~/bin :)