Skip to content

Instantly share code, notes, and snippets.

@stengland
Created November 10, 2012 22:35
Show Gist options
  • Select an option

  • Save stengland/4052786 to your computer and use it in GitHub Desktop.

Select an option

Save stengland/4052786 to your computer and use it in GitHub Desktop.
Quickly serve the pwd
#!/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
@jordelver

Copy link
Copy Markdown

Nice, might add this to my ~/bin :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment