Skip to content

Commit

Permalink
make server killable via ctrl+c
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Oct 4, 2011
1 parent c123073 commit a07e98c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/rhr
Expand Up @@ -36,11 +36,12 @@ BANNER
end

options = parse_options
command = ARGV.shift or raise('did you forget "server" ?')
ARGV.shift == 'server' or raise('did you forget "server" ?')

require 'rhr'

Rack::Handler::WEBrick.run(
RHR::Server.new,
:Port => options[:port] || 3000
)
Rack::Server.new(
:app => RHR::Server.new,
:Port => options[:port] || 3000,
:server => 'webrick'
).start

0 comments on commit a07e98c

Please sign in to comment.