From b214f38d2c24a890ce36512a0c8bab965e27a508 Mon Sep 17 00:00:00 2001 From: JinweiClarkChao Date: Tue, 23 Sep 2014 22:34:14 +0800 Subject: README --- Code/Blocks/syntax/tests/webrick.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Code/Blocks/syntax/tests/webrick.rb (limited to 'Code/Blocks/syntax/tests/webrick.rb') diff --git a/Code/Blocks/syntax/tests/webrick.rb b/Code/Blocks/syntax/tests/webrick.rb new file mode 100644 index 0000000..0b3c93c --- /dev/null +++ b/Code/Blocks/syntax/tests/webrick.rb @@ -0,0 +1,11 @@ +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 -- cgit v1.2.3