import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg' export default (appInfo: EggAppInfo) => { const config = {} as PowerPartial // override config from framework / plugin // use for cookie sign key, should change to your own and keep security config.keys = appInfo.name + '_1656508245172_7706' // add your egg config in here config.middleware = [] // add your special config in here const bizConfig = { sourceUrl: `https://github.com/eggjs/examples/tree/master/${appInfo.name}`, } config.security = { // xframe: { // enable: false, // }, csrf: { enable: false, }, } config.mongoose = { client: { // url: 'mongodb://username:password@host:port/database?authSource=admin', url: 'mongodb://127.0.0.1/database', // plugins: [], options: { useUnifiedTopology: true, }, }, } // the return config will combines to EggAppConfig return { ...config, ...bizConfig, } }