Sha256: 4d67fe1734f8d18d97aa58e2c3c57b9728dd58a059b1c54f93e4b02f00f381f1
Contents?: true
Size: 802 Bytes
Versions: 1
Compression:
Stored size: 802 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' $:.unshift File.join( File.dirname(__FILE__), "/../lib") require 'ferver' options = {} OptionParser.new do |opts| opts.banner = 'Ferver: A simple web app to serve files over HTTP. Version: ' + Ferver::VERSION opts.separator '' opts.on('-a', '--all', 'Serve hidden files') do |a| options[:hidden] = a end opts.on('-d', '--directory [DIRECTORY]', 'Specify the path to the directory to serve files from [optional]') do |directory| options[:directory] = directory end opts.on("-h", "--help", "Displays help") do puts opts exit end end.parse! Ferver.configure do |config| config.serve_hidden = options[:hidden] config.directory_path = options[:directory] end Ferver::App.set :environment, :production # run! Ferver::App.run!
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ferver-1.3.0 | bin/ferver |