Sunday, October 29, 2006

RoR-2: Ruby & Webrick

WEBrick WebServer >> ruby httpd.rb
http://localhost:10080/hello/
http://localhost:10080/multipart/
http://localhost:10080/urlencoded/

更改 hello.rb + Haha
stop(^C) & start Webrick 才看到改變

C:\ruby\samples\RubySrc-1.8.5\sample\webrick>ruby httpd.rb

[2006-10-29 21:49:15] INFO WEBrick 1.3.1[2006-10-29
21:49:15] INFO ruby 1.8.5 (2006-08-25) [i386-mswin32]

[2006-10-29 21:49:15]
DEBUG TCPServer.new(0.0.0.0, 10080)

[2006-10-29 21:49:15] DEBUG
WEBrick::HTTPServlet::FileHandler is mounted on /.[2006-10-29 21:49:15] DEBUG
HelloServlet is mounted on /hello.

[2006-10-29 21:49:16] DEBUG DemoServlet is
mounted on /urlencoded.

[2006-10-29 21:49:16] DEBUG DemoServlet is mounted on
/multipart.

[2006-10-29 21:49:16] INFO WEBrick::HTTPServer#start: pid=1056
port=10080

[2006-10-29 21:50:44] DEBUG accept: 127.0.0.1:2369

[2006-10-29
21:50:44] DEBUG HelloServlet is invoked.localhost - - [29/Oct/2006:21:50:44
台北標準時間] "GET /hello HTTP/1.1" 200 14- -> /helloMozilla/5.0 (Windows; U;
Windows NT 5.1; zh-TW; rv:1.8.1) Gecko/20061010 Firefox/2.0

No comments: