Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (26 sloc) 622 Bytes
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'rubygems'
require 'bundler/setup'
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
require "eventmachine"
require "yaml"
require "dea/bootstrap"
unless ARGV.size == 1
abort "Usage: dea <config path>"
end
begin
config = YAML.load_file(ARGV[0])
rescue => e
abort "ERROR: Failed loading config: #{e}"
end
bootstrap = Dea::Bootstrap.new(config)
EM.epoll
begin
EM.run do
bootstrap.setup
bootstrap.start
end
rescue => e
STDERR.puts "Encountered error: #{e}\n#{e.backtrace.join("\n")}"
end