Sha256: 4848800b5ba27a8dc05192530cd6b12365f5052eac1e887b525d000a3a768418
Contents?: true
Size: 716 Bytes
Versions: 46
Compression:
Stored size: 716 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] || 'thin' 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) if File.exists? 'config.ru' Rack::Server.start(options.merge(:config => 'config.ru')) else Rack::Server.start(options.merge(:config => Rbbt.share['config.ru'].find)) end end
Version data entries
46 entries across 46 versions & 1 rubygems