made all changes for heroku

This commit is contained in:
Connor Turland 2014-05-17 15:02:48 -04:00
parent 48dc11b53d
commit 72b3ae625b
3 changed files with 11 additions and 9 deletions

View file

@ -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');

View file

@ -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

View file

@ -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
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