Skip to content

Instantly share code, notes, and snippets.

@bradtheappguy
Created July 16, 2012 19:33
Show Gist options
  • Save bradtheappguy/3124547 to your computer and use it in GitHub Desktop.
Save bradtheappguy/3124547 to your computer and use it in GitHub Desktop.
Ruby Oneliner to run a http server in the current directory
# This is a command line one-liner to run a webserver with the contents of the current directory. no Config needed!
#
ruby -r webrick -e "s = WEBrick::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