diff --git a/app/views/maps/show.html.erb b/app/views/maps/show.html.erb
index d841635c..d7296222 100644
--- a/app/views/maps/show.html.erb
+++ b/app/views/maps/show.html.erb
@@ -254,8 +254,10 @@
initialize("chaotic", true);
});
}
- //window.realtime.socket = io.connect('http://gentle-savannah-1303.herokuapp.com');
- window.realtime.socket = io.connect('http://metamaps.cc:5001');
+ window.realtime.socket = io.connect('http://gentle-savannah-1303.herokuapp.com'); // this is for the heroku staging environment
+ //window.realtime.socket = io.connect('http://metamaps.cc:5001'); // this is for metamaps.cc
+ //window.realtime.socket = io.connect('http://localhost:5001'); // this is for localhost development
+
window.realtime.socket.on('connect', function() {
subscribeToRooms();
console.log('socket connected');
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index fc2581e0..37323a01 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -13,7 +13,7 @@ Devise.setup do |config|
if Rails.env.development?
#config.secret_key = 'f71c467e526f23d614b3b08866cad4788c502bed869c282f06e73ee6c94675b62fe1f6d52fa7ba8196b33031f0d2f3b67e27ea07693c52ecebccb01700cad614'
end
- if Rails.env.production?
+ if Rails.env.production? # this is for the heroku staging environment
config.secret_key = 'd91ba0da95749174ee2b8922034783cbde4945409ed28b13383e18e72844beb74467f8199e9e216f0687cd2290c6e46bf74da24486d14bba3671d76c5b10c753'
end
diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb
index 3acdbeae..a109199a 100644
--- a/config/initializers/redis.rb
+++ b/config/initializers/redis.rb
@@ -1,6 +1,6 @@
-#if Rails.env.development?
-$redis = Redis.new(:host => 'localhost', :port=> 6379)
-#elsif Rails.env.production?
-# uri = URI.parse(ENV["REDISTOGO_URL"])
-# $redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
-#end
\ No newline at end of file
+if Rails.env.development? ## this also applies to metamaps.cc production mode
+ $redis = Redis.new(:host => 'localhost', :port=> 6379)
+elsif Rails.env.production? ## this is for the heroku staging environment
+ uri = URI.parse(ENV["REDISTOGO_URL"])
+ $redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
+end
\ No newline at end of file