Sha256: bb8a4da8401dec1f7907ba4dde14ed0a93e73bcf1c5db3eba9f005e9aac49d50
Contents?: true
Size: 636 Bytes
Versions: 2
Compression:
Stored size: 636 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'sinatra' 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('-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.directory_path = options[:directory] end Ferver::App.set :environment, :production # run! Ferver::App.run!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ferver-1.2.1 | bin/ferver |
ferver-1.2.0 | bin/ferver |