text: 'use strict';
  
  var path = require('path');
  var _ = require('lodash');
  var fs = require('fs');
  
  var all = {
    env: process.env.NODE_ENV,
    root: path.normalize(__dirname + '/../../..'),
    port: process.env.PORT || 9000,
    mongo: {
      options: {
        db: {
          safe: true
        }
      }
    },
    seedDB: false,
    secrets: {
      session: 'julian-secret'
    },
    userRoles: ['user', 'admin'],
    qiniu:{
      app_key:"app_key",
      app_secret:"app_secret",
      domain:"domain",          //七牛配置域名
      bucket:"bucket"           //七牛空间名称  
    },
    //默认首页图片.
    defaultIndexImage:"http://zanjs.b0.upaiyun.com/image/f/26/49ece171e4779095a65336859d3dd.jpg",
    github:{
      clientID:"f3bf0b0dcab5532d9833",
      clientSecret:"02e96fc57ff6ba4d2925efe6edfc3b3c7338412f",
      callback:"http://localhost:3000/auth/github/callback"
    },
    weibo:{
      clientID:"clientID",
      clientSecret:"clientSecret",
      callbackURL:"/auth/weibo/callback"
    },
    qq:{
      clientID:"clientID",
      clientSecret:"clientSecret",
      callbackURL:"/auth/qq/callback"
    }
  };
  
  var config = _.merge(all,require('./' + process.env.NODE_ENV + '.js') || {});
  //加载私有配置
  if (fs.existsSync(path.join(__dirname, 'private/index.js'))) {
    config = _.merge(config, require(path.join(__dirname, 'private/index.js')) || {});  
  }
  module.exports = config;
  