method
perform
v7.0.0 -
Show latest stable
- Class:
Rails::Command::ServerCommand
perform()public
No documentation available.
# File railties/lib/rails/commands/server/server_command.rb, line 129
def perform
extract_environment_option_from_argument
set_application_directory!
prepare_restart
Rails::Server.new(server_options).tap do |server|
# Require application after server sets environment to propagate
# the --environment option.
require APP_PATH
Dir.chdir(Rails.application.root)
if server.serveable?
print_boot_information(server.server, server.served_url)
after_stop_callback = -> { say "Exiting" unless options[:daemon] }
server.start(after_stop_callback)
else
say rack_server_suggestion(options[:using])
end
end
end