<commit_before>'use strict';
const _ = require('lodash');

module.exports = function(){
  let defaults = {
    facebook: {
      clientID: process.env.FACEBOOK_CLIENT_ID,
      clientSecret: process.env.FACEBOOK_CLIENT_SECRET,
      callbackURL: 'http://localhost:3300/v1/auth/facebook/return'
    },
    sessionKey: process.env.SESSION_KEY,
    mongodbName: 'petcollab-mongodb'
  };

  switch(process.env.NODE_ENV){
    case 'development':
    default:
      return _.assign(defaults, {
        port: process.env.PORT || 3300,
        database: {
          dialect: 'sqlite',
          storage: './petcollab-db.development.sqlite',
          logging: false
        },
        log: {
          name: 'petcollab-api-dev',
          streams: [
            {
              level: 'info',
              stream: process.stdout
            },
            {
              level: 'error',
              stream: process.stdout
            }
          ]
        }
      });

    case 'test':
      return _.assign(defaults, {
        port: process.env.PORT || 3000,
        database: {
          dialect: 'sqlite',
          storage: './petcollab-db.test.sqlite',
          logging: false
        }, 
        log: {
          name: 'petcollab-api-test',
          level: 'error',
          stream: process.stdout
        }
      });

    case 'production':
      return _.assign(defaults, {
        port: process.env.PORT,
        database: {
          use_env_variable: 'POSTGRES_CONNECTION_STRING',
          dialect: 'postgres',
          protocol: 'postgres',
          native: true,
          ssl: true,
          dialectOptions: {
            'ssl': true
          },
          logging: false
        }, 
        log: {
          name: 'petcollab-api',
          streams: [
            {
              level: 'info',
              stream: process.stdout
            },
            {
              level: 'error',
              stream: process.stderr
            }
          ]
        },
        facebook: {
          callbackURL: 'https://petcollab-api.herokuapps.com/v1/user/info'
        }
      });
  }
};<commit_msg>fixes heroku config bug<commit_after>'use strict';
const _ = require('lodash');

module.exports = function(){
  let defaults = {
    facebook: {
      clientID: process.env.FACEBOOK_CLIENT_ID,
      clientSecret: process.env.FACEBOOK_CLIENT_SECRET,
      callbackURL: 'http://localhost:3300/v1/auth/facebook/return'
    },
    sessionKey: process.env.SESSION_KEY,
    mongodbName: 'petcollab-mongodb'
  };

  switch(process.env.NODE_ENV){
    case 'development':
    default:
      return _.assign(defaults, {
        port: process.env.PORT || 3300,
        database: {
          dialect: 'sqlite',
          storage: './petcollab-db.development.sqlite',
          logging: false
        },
        log: {
          name: 'petcollab-api-dev',
          streams: [
            {
              level: 'info',
              stream: process.stdout
            },
            {
              level: 'error',
              stream: process.stdout
            }
          ]
        }
      });

    case 'test':
      return _.assign(defaults, {
        port: process.env.PORT || 3000,
        database: {
          dialect: 'sqlite',
          storage: './petcollab-db.test.sqlite',
          logging: false
        }, 
        log: {
          name: 'petcollab-api-test',
          level: 'error',
          stream: process.stdout
        }
      });

    case 'production':
      return _.assign(defaults, {
        port: process.env.PORT,
        database: {
          use_env_variable: 'POSTGRES_CONNECTION_STRING',
          dialect: 'postgres',
          protocol: 'postgres',
          native: true,
          ssl: true,
          dialectOptions: {
            'ssl': true
          },
          logging: false
        }, 
        log: {
          name: 'petcollab-api',
          streams: [
            {
              level: 'info',
              stream: process.stdout
            },
            {
              level: 'error',
              stream: process.stderr
            }
          ]
        },
        facebook: {
          clientID: process.env.FACEBOOK_CLIENT_ID,
          clientSecret: process.env.FACEBOOK_CLIENT_SECRET,
          callbackURL: 'https://petcollab-api.herokuapps.com/v1/user/info'
        }
      });
  }
};
{'fraction_non_alphanumeric': 0.1208084519981626, 'fraction_numerical': 0.006430868167202572, 'mean_word_length': 1.3797814207650274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '603572', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1247, 'n_words': 217}