Sha256: 3ea4cdc1158518c32d98b0b774e5a44bd4dda8150070092e21d40ab6e6f1c2c8
Contents?: true
Size: 669 Bytes
Versions: 5
Compression:
Stored size: 669 Bytes
Contents
#!/usr/bin/env ruby $LOAD_PATH.push File.expand_path('../../lib', __FILE__) require 'optparse' require 'rubrowser' require 'rubrowser/server' OPTIONS = { port: 9000, files: ARGV.empty? ? ['.'] : ARGV } OptionParser.new do |opts| opts.banner = "Usage: #{__FILE__} [options] [file] ..." opts.on('-pPORT', '--port=PORT', 'Specify port number for server, default = 9000') do |port| OPTIONS[:port] = port.to_i end opts.on('-v', '--version', 'Print Rubrowser version') do puts "Rubrowser #{Rubrowser::VERSION}" exit end opts.on('-h', '--help', 'Prints this help') do puts opts exit end end.parse! Rubrowser::Server.start(OPTIONS)
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rubrowser-0.2.7 | bin/rubrowser |
rubrowser-0.2.6 | bin/rubrowser |
rubrowser-0.2.5 | bin/rubrowser |
rubrowser-0.2.4 | bin/rubrowser |
rubrowser-0.2.3 | bin/rubrowser |