import { EggAppConfig , EggAppInfo , PowerPartial } from 'egg' ; export default ( appInfo ) => { const config = { } as PowerPartial < EggAppConfig > ; config . keys = appInfo . name + '_1572947163069_8100' ; config . middleware = [ ] ; config . modelWhitelist = [ 'BaseModel' , 'Fee' ] ; config . security = { csrf : { enable : false , } , } ; config . io = { init : { } , namespace : { '/' : { connectionMiddleware : [ 'connection' ] , packetMiddleware : [ 'packet' ] , } , '/chat' : { connectionMiddleware : [ 'connection' ] , packetMiddleware : [ ] , } , } , } ; config . cors = { origin : '*' , allowMethods : 'GET,HEAD,PUT,POST,DELETE,PATCH' , credentials : true } ; config . mongoose = { url : process . env . EGG_MONGODB_URL || 'mongodb://127.0.0.1/egg-demo' , options : { } , } ; config . graphql = { router : '/graphql' , dateScalarMode : 'timestamp' } ; const bizConfig = { sourceUrl : `https://github.com/eggjs/examples/tree/master/${ appInfo . name }` , } ; return { ... config , ... bizConfig , } ; } ;