Sha256: 9eeabd100295e1aa47925c153d3c3477adeb55380b8e4abcd2ff748f455deb9e
Contents?: true
Size: 933 Bytes
Versions: 1
Compression:
Stored size: 933 Bytes
Contents
#!/usr/bin/env ruby options = {} parser = OptionParser.new do |opts| opts.on "-p", "--port PORT", Integer, "Define what port TCP port to bind to (default: 3000)" do |arg| options[:port] = arg end opts.on "-a", "--address HOST", "bind to HOST address (default: 0.0.0.0)" do |arg| options[:host] = arg end opts.on "-s", "--queue-socket PATH", "Socket for IPC communication" do options[:quiet] = true end opts.on "-e", "--environment ENVIRONMENT", "The environment to run the Rack app on (default: development)" do |arg| ENV['RACK_ENV'] ||= arg end end parser.banner = "alondra <options>" parser.on_tail "-h", "--help", "Show help" do puts parser exit 1 end parser.parse(ARGV) ENV['RACK_ENV'] ||= 'development' require './config/environment' require 'alondra' Alondra::Alondra.start_with_options(options) puts "Alondra server started at port #{Alondra::Alondra.config.port}" sleep
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alondra-0.1.1 | bin/alondra |