config.js 942 Bytes
const _ = require('lodash');
const env = process.env.NODE_ENV || 'development';

const isProduction = env === 'production';
const isTest = env === 'test';

const config = {
    app: 'ufo-data-platform',
    port: 6013,
    mysql: {
        host: '192.168.102.219',
        user: 'yh_test',
        password: 'yh_test',
        port: '3306',
        database: 'ufo_order'
    },
    uids: [100750, 10228]
};

if (isTest) {
    _.merge(config, {
        mysql: {
            host: '192.168.102.219',
            user: 'yh_test',
            password: 'yh_test',
            port: '3306',
            database: 'ufo_order'
        }
    });
} else if (isProduction) {
    _.merge(config, {
        mysql: {
            // host: '10.66.0.139',
            // port: '3306',
            // database: 'webapm',
            // user: 'root',
            // password: 'yB877Jy7tV6juIYk'
        },
        uids: []
    });
}


module.exports = config;