diff options
author | JinweiClarkChao <[email protected]> | 2014-08-22 17:23:02 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:42 +0800 |
commit | 80255411ee7040e0cebbf6b05d2ce323f6f2596e (patch) | |
tree | 295b0ef6c85e7cb091b63719ab041596879690fa /Back/Blocks/syntax/tests/webrick.rb | |
parent | 13be3d058713e1467ffc573a90cc694b80526135 (diff) | |
download | jinwei.me-80255411ee7040e0cebbf6b05d2ce323f6f2596e.tar.gz |
backup
Diffstat (limited to 'Back/Blocks/syntax/tests/webrick.rb')
-rw-r--r-- | Back/Blocks/syntax/tests/webrick.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Back/Blocks/syntax/tests/webrick.rb b/Back/Blocks/syntax/tests/webrick.rb new file mode 100644 index 0000000..0b3c93c --- /dev/null +++ b/Back/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 | ||