Skip to content

Instantly share code, notes, and snippets.

@grassdog
Created January 18, 2011 02:31
Show Gist options
  • Save grassdog/783893 to your computer and use it in GitHub Desktop.
Save grassdog/783893 to your computer and use it in GitHub Desktop.
Add this to your bashrc or zsh profile so you can serve up the current directory with webrick
function rserve () {
ruby -rwebrick -e"s = WEBrick::HTTPServer.new(:Port => 3000, :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