Sha256: b7410e881c500d6205bd267deac252eec04583c60c098d9c01ed993d0025c74f

Contents?: true

Size: 643 Bytes

Versions: 7

Compression:

Stored size: 643 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8
require 'thor'

$LOAD_PATH << File.expand_path('../../lib', __FILE__)
require 'local_pac'

class Default < Thor
  desc 'serve', 'Serve pacfiles'
  option :logfile, type: :string, default: File.expand_path(File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'access.log')), desc: 'File to write access log to'
  option :port, type: :numeric, default: 8000, desc: 'The port the server listens on'
  def serve
    LocalPac::FileServer.use Rack::CommonLogger, LocalPac::Logger.new(options[:logfile])
    LocalPac::FileServer.set :port, options[:port]
    LocalPac::FileServer.run!
  end
end

Default.start

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
local_pac-0.0.7 bin/local_pac
local_pac-0.0.6 bin/local_pac
local_pac-0.0.5 bin/local_pac
local_pac-0.0.4 bin/local_pac
local_pac-0.0.3 bin/local_pac
local_pac-0.0.2 bin/local_pac
local_pac-0.0.1 bin/local_pac