I'm trying set the server options I.E. port, host, etc but I can't find anything on how to do this from within the config.ru
file.
I've tried putting the config options into a hash and then doing:
configure { set :server, config[:server][:handler].to_sym }
Rack::Handler.default.run(App, config[:server])
Also tried:
Rack::Handler::pick(['puma']).run App, config[:server]
and even:
configure { set :server, config[:server].delete(:handler).to_sym }
so that the handler won't be in the server config hash and still...
no dice.
config hash is:
{
:handler => "puma",
:host => "127.0.0.1",
:port => 3000,
:threads => "0:16",
:verbose => true
}
But the hash config just gets ignored, I set the port to 3000
but the app loads with 8080
as default.
It also errors about there not being a run
command present (well obviously, I'm not using it).
So a fix for that would also be a nice.
I'm sure there's a proper way to do this but why is it so hard to find it documented? I've done as many search terms into google as I can think of and yet nothing completely correct comes back.