lib/quilt_rails/configuration.rb in quilt_rails-1.1.0 vs lib/quilt_rails/configuration.rb in quilt_rails-1.2.0
- old
+ new
@@ -2,11 +2,14 @@
module Quilt
class Configuration
attr_accessor :react_server_host, :react_server_protocol
def initialize
- @react_server_host = ENV['SERVICE_URL'] || 'localhost:8081'
- @react_server_protocol = ENV['SERVICE_PROTOCOL'] || 'http'
+ ip = ENV['REACT_SERVER_IP'] || 'localhost'
+ port = ENV['REACT_SERVER_PORT'] || 8081
+
+ @react_server_host = "#{ip}:#{port}"
+ @react_server_protocol = ENV['REACT_SERVER_PROTOCOL'] || 'http'
end
end
def self.configuration
@configuration ||= Configuration.new