/lib/syntaxhighlighter_3.0.83/tests/webrick.rb
# · Ruby · 11 lines · 10 code · 1 blank · 0 comment · 0 complexity · c87c5f4cc59c5abbeff64cd57d8e039f MD5 · raw file
- require 'webrick'
- include WEBrick
- s = HTTPServer.new(
- :Port => 2010,
- :DocumentRoot => Dir::pwd
- )
- s.mount('/sh/scripts', WEBrick::HTTPServlet::FileHandler, '../scripts')
- s.mount('/sh/styles', WEBrick::HTTPServlet::FileHandler, '../styles')
- trap('INT') { s.stop }
- s.start