Class: Hanami::Server Private
- Inherits:
-
Rack::Server
- Object
- Rack::Server
- Hanami::Server
- Defined in:
- lib/hanami/server.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Rack compatible server.
It is run with:
`bundle exec hanami server`
It runs the application, by using the server specified in your ‘Gemfile` (eg. Puma or Unicorn).
Instance Attribute Summary collapse
- #options ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
private
A new instance of Server.
-
#middleware ⇒ Object
private
Primarily this removes the ::Rack::Chunked middleware which is the cause of Safari content-length bugs.
- #start ⇒ Object private
Constructor Details
#initialize ⇒ Server
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Server.
23 24 25 26 |
# File 'lib/hanami/server.rb', line 23 def initialize @options = setup end |
Instance Attribute Details
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/hanami/server.rb', line 17 def @options end |
Instance Method Details
#middleware ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Primarily this removes the ::Rack::Chunked middleware which is the cause of Safari content-length bugs.
32 33 34 35 36 37 38 |
# File 'lib/hanami/server.rb', line 32 def middleware mw = Hash.new { |e, m| e[m] = [] } mw["development"].concat([::Rack::ShowExceptions, ::Rack::Lint]) require 'hanami/assets/static' mw["development"].push(::Hanami::Assets::Static) mw end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
41 42 43 44 |
# File 'lib/hanami/server.rb', line 41 def start preload super end |