builder.rb:
def app
Rack::Builder.new do
run App.new
end.to_app
end
How to run on a given port?
Try:
Rack::Handler.default.run(app, :Port => 3000)
Although it would be more typical to run your app in a config.ru
file and specify port as a command line option to rackup
, e.g.: rackup -p 3000
.
When you rackup
just specify it with option -p
so:
rackup -p 8808
would work just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With