Skip to content

Instantly share code, notes, and snippets.

@ThomasRooney
Created January 8, 2014 23:11
Show Gist options
  • Save ThomasRooney/8326473 to your computer and use it in GitHub Desktop.
Save ThomasRooney/8326473 to your computer and use it in GitHub Desktop.
ruby http serve oneliner
ruby -rsocket -e "require 'webrick';include WEBrick;s = HTTPServer.new(:Port => 80, :DocumentRoot => Dir::pwd);trap(\"INT\"){ s.shutdown };s.start;"
ruby -rsocket -e "require 'webrick';include WEBrick;s = HTTPServer.new(:Port => 8080, :DocumentRoot => \"/opt/blocks/client/bin\");trap(\"INT\"){ s.shutdown };s.start;"
146.169.44.231
@owendavies93
Copy link

Don't use WEBrick :P use Thin/Passenger/Unicorn. Probably Thin for dev, it's easiest.

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