bin/steam.rb in locomotivecms_steam-1.5.3 vs bin/steam.rb in locomotivecms_steam-1.6.0.beta1
- old
+ new
@@ -66,10 +66,12 @@
end.parse!
require_relative '../lib/locomotive/steam'
require_relative '../lib/locomotive/steam/server'
+puts options.inspect
+
Locomotive::Steam.configure do |config|
config.mode = :test
config.adapter = options[:adapter]
config.serve_assets = options[:asset_path].present?
config.asset_path = options[:asset_path]
@@ -82,24 +84,12 @@
config.notifier = Locomotive::Common::Logger.setup(options[:log_file])
end
app = Locomotive::Steam.to_app
-# Thin rack handler
-# Note: alt thin settings (Threaded)
-# require 'thin'
-# server = Thin::Server.new(server_options[:address], server_options[:port], app)
-# server.threaded = true
-# server.start
-# Locomotive::Common::Logger.info 'Server started...'
-# FIXME: Rack::Handler::Thin.run app (not threaded)
-
-# WEBRick rack handler
-# Rack::Handler::WEBrick.run app
-# Locomotive::Common::Logger.info 'Server started...'
-
# Puma rack handler
require 'puma'
+
server = ::Puma::Server.new(app)
server.add_tcp_listener server_options[:address], server_options[:port]
server.min_threads = 4
server.max_threads = 16
begin