Sha256: 147ec6be6299efb73bf779fc57be0b8042b713d5327ecbaa137c85cf3b4fbdbd
Contents?: true
Size: 791 Bytes
Versions: 4
Compression:
Stored size: 791 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'json' opt_parser = OptionParser.new do |opt| opt.banner = 'Usage: sabisu [OPTIONS]' opt.on('-c', '--config FILE', 'config file in json format') do |c| CONFIG_FILE = JSON.parse(File.read(c), symbolize_names: true) end opt.on('-p', '--port INT', 'port to run on') do |p| PORT = p end opt.on('-e', '--environment ENVIRONMENT', 'environment to run as (ie "production" or "development"') do |e| SABISU_ENV = e end opt.on('-h', '--help', 'help') do puts opt_parser exit 0 end end opt_parser.parse! CONFIG_FILE = {} unless defined?(CONFIG_FILE) begin # look for local copy first for dev purposes require_relative '../lib/sabisu' rescue LoadError require 'sabisu' end Sabisu::Server.run!
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sabisu-0.1.3 | bin/sabisu |
sabisu-0.1.2 | bin/sabisu |
sabisu-0.1.1 | bin/sabisu |
sabisu-0.1.0 | bin/sabisu |