// Dependencies
var path = require('path'),
  AWS = require('aws-sdk'),
  rootPath = path.normalize(path.join(__dirname, '..')),
  
  //Environment variables
  env = process.env.NODE_ENV || 'production',
  accessKeyId = process.env.AWS_ACCESS_KEY,
  secretAccessKey = process.env.AWS_SECRET_KEY,
  region = process.env.AWS_REGION,
  bucket = process.env.AWS_BUCKET || 'babyanimals',
  db = process.env.DB || 'mongodb://localhost/dev-production',
  uristring = process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || 'mongodb://localhost/dev-production',
  config;

// Configuration
AWS.config.update({accessKeyId: accessKeyId, secretAccessKey: secretAccessKey, region: region});

config = {
  development: {
    root: rootPath,
    app: {
      name: 'dev'
    },
    port: process.env.PORT || 3000,
    db: uristring
  },

  test: {
    root: rootPath,
    app: {
      name: 'test'
    },
    port: process.env.PORT || 3000,
    db: uristring
  },

  production: {
    root: rootPath,
    app: {
      name: 'production'
    },
    port: process.env.PORT || 3000,
    db: uristring
  }
};

module.exports = config[env];

@@ -201,250 +201,8 @@
 n',%0A
-  accessKeyId = process.env.AWS_ACCESS_KEY,%0A  secretAccessKey = process.env.AWS_SECRET_KEY,%0A  region = process.env.AWS_REGION,%0A  bucket = process.env.AWS_BUCKET %7C%7C 'babyanimals',%0A  db = process.env.DB %7C%7C 'mongodb://localhost/dev-production',%0A
   ur
@@ -351,16 +351,19 @@
 update(%7B
+%0A  
 accessKe
@@ -371,69 +371,118 @@
 Id: 
-ac
+pro
 cess
-KeyId, secretAccessKey: secretAccessKey, region: region
+.env.AWS_ACCESS_KEY, %0A  secretAccessKey: process.env.AWS_SECRET_KEY, %0A  region: process.env.AWS_REGION%0A
 %7D);%0A

delete uncessary env var