Last active
July 31, 2018 03:03
-
-
Save jacksonpires/a9aa3359afd922497d3d110fe1020e62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#file bin/rails | |
--------------- | |
#!/usr/bin/env ruby | |
begin | |
load File.expand_path('../spring', __FILE__) | |
rescue LoadError => e | |
raise unless e.message.include?('spring') | |
end | |
APP_PATH = File.expand_path('../../config/application', __FILE__) | |
require_relative '../config/boot' | |
# Set default host and port to rails server | |
if ARGV.first == 's' || ARGV.first == 'server' | |
require 'rails/commands/server' | |
module Rails | |
class Server | |
def default_options | |
super.merge(Host: ENV["IP"], Port: ENV["PORT"]) | |
end | |
end | |
end | |
end | |
require 'rails/commands' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment