Skip to content

Instantly share code, notes, and snippets.

@yoones
Created May 19, 2019 20:20
Show Gist options
  • Save yoones/0d0680a006c33a728f56ea33100905a2 to your computer and use it in GitHub Desktop.
Save yoones/0d0680a006c33a728f56ea33100905a2 to your computer and use it in GitHub Desktop.
server options
class_option :config, aliases: "-c", type: :string, default: "config.ru",
desc: "Uses a custom rackup configuration.", banner: :file
# [...]
def server_options
{
user_supplied_options: user_supplied_options,
server: using,
log_stdout: log_to_stdout?,
Port: port,
Host: host,
DoNotReverseLookup: true,
config: options[:config],
environment: environment,
daemonize: options[:daemon],
pid: pid,
caching: options[:dev_caching],
restart_cmd: restart_command,
early_hints: early_hints
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment