Sha256: 3ce8d9d6c1d8df63f244d20f149d06576f153d26ce789157e48cbf1274a0217e

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.expand_path("../../lib", __FILE__))

require 'rack-webdav'

root=ARGV[1] || Dir.pwd
port = ARGV[0] || 3000

require 'rack-timeout'

Rack::Timeout::Logger.device = $stderr
Rack::Timeout::Logger.level  = Logger::INFO
Rack::Timeout.service_timeout = 50

app = Rack::Builder.new do
  use Rack::ShowExceptions
  use Rack::CommonLogger
  use Rack::Reloader
  use Rack::Lint
  use Rack::Timeout

  run RackWebDAV::Handler.new(:root => root)
end.to_app

begin
  require 'rack/handler/puma'
  Rack::Handler::Puma.run(app, Host: '0.0.0.0', Port: port)
# rescue NameError, LoadError
#  begin
#    require 'unicorn'
#    Unicorn::HttpServer.new(app, :listeners => ["0.0.0.0:3000"]).start.join
#  rescue NameError, LoadError
#    begin
#      Rack::Handler::WEBrick.run(app, Host: '0.0.0.0', Port: port)
#    rescue NameError, LoadError
#      Rack::Handler::Mongrel.run(app, Host: '0.0.0.0', Port: port)
#    end
#  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-webdav-0.4.5 bin/rack-webdav
rack-webdav-0.4.4 bin/rack-webdav