2014-02-07 03:15:00 +08:00
|
|
|
#!/usr/bin/env ruby
|
2018-08-07 15:13:20 +08:00
|
|
|
|
2018-08-09 22:14:45 +08:00
|
|
|
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
|
2018-08-15 08:25:00 +08:00
|
|
|
ENV["UNICORN_PORT"] ||= "3000"
|
|
|
|
|
|
|
|
if ARGV[1] == "-p" && (port = ARGV[2].to_i) > 0
|
|
|
|
ENV["UNICORN_PORT"] = port.to_s
|
|
|
|
end
|
|
|
|
|
2018-08-14 06:49:57 +08:00
|
|
|
ENV["RAILS_LOGS_STDOUT"] ||= "1"
|
2018-08-07 15:13:20 +08:00
|
|
|
exec File.expand_path("unicorn", __dir__)
|
|
|
|
end
|
|
|
|
|
2017-08-31 12:06:56 +08:00
|
|
|
APP_PATH = File.expand_path('../config/application', __dir__)
|
2015-04-16 14:15:04 +08:00
|
|
|
require_relative '../config/boot'
|
|
|
|
require 'rails/commands'
|