Class: Locomotive::Steam::StandaloneServer
- Defined in:
- lib/locomotive/steam/standalone_server.rb
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ StandaloneServer
constructor
A new instance of StandaloneServer.
Methods inherited from Server
Constructor Details
#initialize(path, options = {}) ⇒ StandaloneServer
Returns a new instance of StandaloneServer.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/locomotive/steam/standalone_server.rb', line 14 def initialize(path, ={}) .fetch(:logger) do Locomotive::Steam::Logger.setup(path, false) end reader = .fetch(:reader) do _reader = Locomotive::Mounter::Reader::FileSystem.instance Proc.new { |_path| _reader.run!(path: _path) } end reader.call path Bundler.require 'monkey_patches' Bundler.require 'initializers' # run the rack app super(reader, disable_listen: true) end |