Method: Puma::DSL#bind
- Defined in:
- lib/puma/dsl.rb
#bind(url) ⇒ Object
Bind the server to url
. “tcp://”, “unix://” and “ssl://” are the only accepted protocols. Multiple urls can be bound to, calling bind
does not overwrite previous bindings.
The default is “tcp://0.0.0.0:9292”.
You can use query parameters within the url to specify options:
-
Set the socket backlog depth with
backlog
, default is 1024. -
Set up an SSL certificate with
key
&cert
. -
Set up an SSL certificate for mTLS with
key
,cert
,ca
andverify_mode
. -
Set whether to optimize for low latency instead of throughput with
low_latency
, default is to not optimize for low latency. This is done viaSocket::TCP_NODELAY
. -
Set socket permissions with
umask
.
274 275 276 277 |
# File 'lib/puma/dsl.rb', line 274 def bind(url) @options[:binds] ||= [] @options[:binds] << url end |