#!/usr/bin/env ruby require "slop" argv = ARGV.dup slop = Slop.new(:strict => true, :help => true) slop.banner "$ leandocument [options]" slop.on :p, :port=, "port number for http server (default is 4567)" begin slop.parse!(argv) rescue => e puts e exit! end options = slop.to_hash options.delete(:help) options[:port] ||= 4567 $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) require "leandocument" Leandocument::Server.start