Sha256: 2708c365caf889e93dcbd09f0401eeaae090c494bc543a0c085ca67ec715f6ef

Contents?: true

Size: 817 Bytes

Versions: 9

Compression:

Stored size: 817 Bytes

Contents

# Load gem files
load_path_libs = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
$LOAD_PATH.unshift(load_path_libs) unless $LOAD_PATH.include?(load_path_libs)
require 'rest-ftp-daemon'

# Create queue and worker pool
$queue = RestFtpDaemon::JobQueue.new
$pool = RestFtpDaemon::WorkerPool.new(Settings[:workers] || DEFAULT_WORKERS)

# Rack reloader
unless Settings.namespace == "production"
  use Rack::Reloader, 0
end

# Rack authent
unless Settings.adminpwd.nil?
  use Rack::Auth::Basic, "Restricted Area" do |username, password|
    [username, password] == ['admin', Settings.adminpwd]
  end
end

# Serve static assets
use Rack::Static, :urls => ["/css", "/images"], :root => "#{APP_LIBS}/static/"

# Launch the main daemon
run RestFtpDaemon::API::Root
#run Rack::Cascade.new [RestFtpDaemon::API::Root]

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.104.5 config.ru
rest-ftp-daemon-0.103.1 config.ru
rest-ftp-daemon-0.101 config.ru
rest-ftp-daemon-0.100.2 config.ru
rest-ftp-daemon-0.100 config.ru
rest-ftp-daemon-0.95.2 config.ru
rest-ftp-daemon-0.94.4 config.ru
rest-ftp-daemon-0.90.1 config.ru
rest-ftp-daemon-0.85.2 config.ru