Skip to content

Instantly share code, notes, and snippets.

@alexeckermann
Created May 14, 2011 06:59
Show Gist options
  • Save alexeckermann/972004 to your computer and use it in GitHub Desktop.
Save alexeckermann/972004 to your computer and use it in GitHub Desktop.
Webrick Server for TumblrThemr
#!/usr/bin/ruby
require 'webrick'
include WEBrick
s = HTTPServer.new(:Port => 3000, :DocumentRoot => Dir::pwd)
['INT', 'TERM'].each { |sig| trap(sig) { s.shutdown } }
s.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment