import { EggAppConfig , EggAppInfo , PowerPartial } from "egg" ; export default ( appInfo ) => { const config = { } as PowerPartial < EggAppConfig > ; config . keys = appInfo . name + "_1596002405659_3047" ; config . middleware = [ "jwtAuth" , "errorHandler" ] ; config . jwtAuth = { } ; config . errorHandler = { } ; config . security = { csrf : { enable : false , } , } ; config . cors = { origin : ( ctx ) => ctx . get ( "origin" ) , credentials : true , allowMethods : "GET,HEAD,PUT,POST,DELETE,PATCH" , } ; const bizConfig = { sourceUrl : `https://github.com/eggjs/examples/tree/master/${ appInfo . name }` , } ; config . sequelize = { database : "devops_dev" , delegate : "model" , baseDir : "model" , dialect : "mysql" , host : "localhost" , port : 3306 , username : "root" , password : "root123456" , } ; config . jwt = { secret : "123456" , } ; config . io = { init : { } , namespace : { "/" : { connectionMiddleware : [ ] , packetMiddleware : [ ] , } , "/example" : { connectionMiddleware : [ ] , packetMiddleware : [ ] , } , } , } ; return { ... config , ... bizConfig , } ; } ;