当我在没有sinatra
的情况下运行shotgun
应用时,它会告诉我们每个请求都已完成:
$ ruby app.rb
[2014-03-21 16:56:03] INFO WEBrick 1.3.1
[2014-03-21 16:56:03] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
== Sinatra/1.4.4 has taken the stage on 4567 for development with backup from WEBrick
[2014-03-21 16:56:03] INFO WEBrick::HTTPServer#start: pid=27957 port=4567
127.0.0.1 - - [21/Mar/2014 16:56:07] "GET / HTTP/1.1" 200 12 0.0019
localhost - - [21/Mar/2014:16:56:07 EET] "GET / HTTP/1.0" 200 12
- -> /
shotgun
不会这样做:
$ shotgun -p 4567 app.rb
== Shotgun/WEBrick on http://127.0.0.1:4567/
[2014-03-21 16:58:05] INFO WEBrick 1.3.1
[2014-03-21 16:58:05] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
[2014-03-21 16:58:05] INFO WEBrick::HTTPServer#start: pid=28322 port=4567
有没有办法让shotgun
以同样的方式工作?