24 lines
866 B
TypeScript
24 lines
866 B
TypeScript
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
|
|
import defaultConfig from './config.default';
|
|
|
|
export default (appInfo: EggAppInfo) => {
|
|
const config = {} as PowerPartial<EggAppConfig>;
|
|
|
|
// add your special config in here
|
|
|
|
config.mongoose = {
|
|
url: 'mongodb://dbop:zyzDev2021@dds-8vb5c74ba4263da41.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5c74ba4263da42.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5c74ba4263da43.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?readPreference=secondary&replicaSet=mgset-506991391', // 内网
|
|
options: { useNewUrlParser: true, useUnifiedTopology: true },
|
|
};
|
|
|
|
config.redis = {
|
|
url: 'r-8vbl8okinxn1zhkwh2.redis.zhangbei.rds.aliyuncs.com', // 内网
|
|
pw: 'zyz_alpha_2021'
|
|
};
|
|
// the return config will combines to EggAppConfig
|
|
return {
|
|
...defaultConfig(appInfo),
|
|
...config,
|
|
};
|
|
};
|