var path = require('path');
var rootPath = path.normalize(__dirname + '/..');
var env = process.env.NODE_ENV || 'development';

var config = {
  development: {
    root: rootPath,
    app: {
      name: 'dev'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-development'
  },

  test: {
    root: rootPath,
    app: {
      name: 'test'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-test'
  },

  production: {
    root: rootPath,
    app: {
      name: 'prod'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-production'
  }
};

module.exports = config[env];
var path = require('path');
var AWS = require('aws-sdk');
var rootPath = path.normalize(__dirname + '/..');
var env = process.env.NODE_ENV || 'development';

//change in credentials.json?
var accessKeyId =  process.env.AWS_ACCESS_KEY || 'AKIAJ3EEY33ATJFGVT';
var secretAccessKey = process.env.AWS_SECRET_KEY || "NULhNJcpos/BkT9zLorP9WlOjAFqjYEpSvJkB5m7";

//updata amazon credentials
AWS.config.update({accessKeyId: accessKeyId, secretAccessKey: secretAccessKey});

var config = {
  development: {
    root: rootPath,
    app: {
      name: 'dev'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-development'
  },

  test: {
    root: rootPath,
    app: {
      name: 'test'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-test'
  },

  production: {
    root: rootPath,
    app: {
      name: 'prod'
    },
    port: 3000,
    db: 'mongodb://localhost/dev-production'
  }
};

module.exports = config[env];
add aws env var