Skip to content

Instantly share code, notes, and snippets.

@maliqq
Created July 12, 2012 16:40
Show Gist options
  • Save maliqq/3099224 to your computer and use it in GitHub Desktop.
Save maliqq/3099224 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'webrick'
server = WEBrick::HTTPServer.new(
:Port => 10080,
:BindAddress => '0.0.0.0',
:DocumentRoot => "#{File.dirname(__FILE__)}/../"
)
trap 'INT' do server.shutdown end
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment