Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created July 25, 2014 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeiros/d40d3bd3a6888b12f21d to your computer and use it in GitHub Desktop.
Save apeiros/d40d3bd3a6888b12f21d to your computer and use it in GitHub Desktop.
servr.rb
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => 9951,
:DocumentRoot => File.expand_path(File.dirname(__FILE__))
)
s.config[:MimeTypes].update({
"text" => "text/plain",
})
trap("INT") { s.stop }
s.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment