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:zyzMon2021@dds-8vb7474e31ba7ed41.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb7474e31ba7ed42.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-505529944', // 内网
    options: { useNewUrlParser: true, useUnifiedTopology: true },
  };
  

  // the return config will combines to EggAppConfig
  return {
    ...defaultConfig(appInfo),
    ...config,
  };
};
