How subtle magic "capture" when included in the gemfile / required in the application?

I gem "thin"

and require 'thin'

added to any (similar) Rack application, it will be automatically selected when the application is launched via rackup

instead of WEBrick.

How does rawn know how to use thin? What if I am using a unicorn or cougar or something else?


source to share

1 answer

The source state in the rack contains three default servers in the following order: Thin, Puma, and WEBrick.

The rack will attempt to "mount" these three servers if the environment variables PHP_FCGI_CHILDREN

or are not set RACK_HANDLER


This behavior may change in the future, but for now, only thin and cougar will be automatically recognized when their gems are turned on.



All Articles