Sha256: 39299f2a13a22a8f0cca8c6d70bfe6cb59f0f1ad9b6cbbc32dbed599642ac66d

Contents?: true

Size: 974 Bytes

Versions: 6

Compression:

Stored size: 974 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 global queue
$queue = RestFtpDaemon::JobQueue.new

# Initialize workers and conchita subsystem
$pool = RestFtpDaemon::WorkerPool.new

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

# NewRelic profiling
GC::Profiler.enable if Settings.newrelic_enabled?

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

# Rack reloader and mini-profiler
unless Settings.namespace == "production"
  use Rack::Reloader, 0
  # use Rack::MiniProfiler
end

# Set up encodings
Encoding.default_internal = "utf-8"
Encoding.default_external = "utf-8"

# Launch the main daemon
run RestFtpDaemon::API::Root

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.245.1 config.ru
rest-ftp-daemon-0.245 config.ru
rest-ftp-daemon-0.243.2 config.ru
rest-ftp-daemon-0.243.1 config.ru
rest-ftp-daemon-0.243 config.ru
rest-ftp-daemon-0.242.2 config.ru