Sha256: 9a589ce0fd548de9e8c3f4c93e4f8ae0ff97b92ac6276c2b8d0c8641f7076a90

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 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]

ddd app_dir

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)
  Rack::Server.start(options.merge(:config => 'config.ru'))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbbt-util-5.5.1 share/rbbt_commands/app/start