Sha256: fa0f94d297b0d20b299d734d34cd7bd07d5e1e515a554ced2fca9bcd4a036797
Contents?: true
Size: 829 Bytes
Versions: 123
Compression:
Stored size: 829 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/util/simpleopt' options = SOPT.get "-e--environment*:-p--port*:-s--server*:-f--finder" options[:Port] ||= options[:port] app = ARGV.shift app_dir = Rbbt.etc.app_dir.exists? ? Path.setup(Rbbt.etc.app_dir.read.strip) : Rbbt.apps.find app_dir = app_dir[app] server = options[:server] || 'puma' Misc.in_dir(app_dir) do require 'rack' ENV["RBBT_FINDER"] = "true" if options.include?(:finder) ENV["RACK_ENV"] = options[:environment] if options.include?(:environment) config_ru_file = File.exists?('config.ru') ? 'config.ru' : Rbbt.share['config.ru'].find if server == 'unicorn' `unicorn -c #{ Rbbt.share['unicorn.rb'].find } '#{config_ru_file}' -p #{options[:port] || "2887"}` else Rack::Server.start(options.merge(:config => config_ru_file)) end end
Version data entries
123 entries across 123 versions & 1 rubygems
Version | Path |
---|---|
rbbt-util-5.5.56 | share/rbbt_commands/app/start |
rbbt-util-5.5.55 | share/rbbt_commands/app/start |
rbbt-util-5.5.54 | share/rbbt_commands/app/start |