1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| export default { development: { currentMode: '开发模式', database: { type: 'mysql', host: 'localhost', port: 3306, username: 'root', password: '123456', database: 'db', entities: [join(__dirname, '../', '**/**.entity{.ts,.js}')], synchronize: false, //如果为true的话,会同步数据库,不建议打开 timezone: '+08:00', }, }, production: { currentMode: '生产模式', database: { type: 'mysql', host: 'localhost', port: 3306, username: 'root', password: '123456', database: 'db', entities: [join(__dirname, '../', '**/**.entity{.ts,.js}')], synchronize: false, //如果为true的话,会同步数据库,不建议打开 timezone: '+08:00', }, }, currentEnv:function(){ let ret = {}; if (!ENV) { ret = module.exports.default.development; } else { ret = module.exports.default[ENV]; } return ret; } };
|