Created
October 6, 2009 04:33
-
-
Save bak/202768 to your computer and use it in GitHub Desktop.
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
# | |
# Start a WEBrick server in the cwd (serves html, rhtml, assets) | |
# | |
# Usage: | |
# webrick_on | |
# webrick_on 8000 | |
# | |
function webrick_on | |
{ | |
ruby -e "require 'webrick';include WEBrick;s = HTTPServer.new(:Port => ${@:-9090},:DocumentRoot => Dir::pwd);trap('INT'){s.shutdown};s.start" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment