diff options
author | JinweiClarkChao <[email protected]> | 2014-02-20 12:50:15 +0800 |
---|---|---|
committer | JinweiClarkChao <[email protected]> | 2014-02-20 12:52:51 +0800 |
commit | 31fb10f393fbfd4d7adf528ec70624d2b8d247a8 (patch) | |
tree | 1009bb2a4f5fe89b8bc822b68104018ea8df5261 /Blocks/syntax/tests/webrick.rb | |
parent | be404e3e01ca839e730c884309c25abef10863c9 (diff) | |
download | jinwei.me-31fb10f393fbfd4d7adf528ec70624d2b8d247a8.tar.gz |
Six Blocks Version
Diffstat (limited to 'Blocks/syntax/tests/webrick.rb')
-rw-r--r-- | Blocks/syntax/tests/webrick.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Blocks/syntax/tests/webrick.rb b/Blocks/syntax/tests/webrick.rb new file mode 100644 index 0000000..0b3c93c --- /dev/null +++ b/Blocks/syntax/tests/webrick.rb | |||
@@ -0,0 +1,11 @@ | |||
1 | require 'webrick' | ||
2 | include WEBrick | ||
3 | |||
4 | s = HTTPServer.new( | ||
5 | :Port => 2010, | ||
6 | :DocumentRoot => Dir::pwd | ||
7 | ) | ||
8 | s.mount('/sh/scripts', WEBrick::HTTPServlet::FileHandler, '../scripts') | ||
9 | s.mount('/sh/styles', WEBrick::HTTPServlet::FileHandler, '../styles') | ||
10 | trap('INT') { s.stop } | ||
11 | s.start | ||