北斗应用技术培训报名系统

This commit is contained in:
2026-03-27 17:53:28 +08:00
commit e8e23fb003
58 changed files with 2091 additions and 0 deletions

106
config/config.default.js Normal file
View File

@@ -0,0 +1,106 @@
/* eslint valid-jsdoc: "off" */
/**
* @param {Egg.EggAppInfo} appInfo app info
*/
module.exports = appInfo => {
/**
* built-in config
* @type {Egg.EggAppConfig}
**/
const config = exports = {};
// use for cookie sign key, should change to your own and keep security
config.keys = appInfo.name + '_1715070315660_7890';
// add your middleware config here
// config.middleware = [];
config.static = {
maxAge: 0,
buffer: false,
};
config.multipart = {
mode: 'file', // 使用文件模式保存上传的文件
whitelist: () => true, // 允许所有文件类型上传
};
config.security = {
csrf:{
enable:false
},
};
config.redis = {
// 开发/测试环境
clients: {
db3: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 3
},
db6: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 6
}
}
// 生产环境
// clients: {
// db3: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 5
// },
// db6: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 8
// }
// }
};
config.sequelize = {
// 开发/测试环境
datasources: [
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'bdTrainingExam'
}
]
// 生产环境
// datasources: [
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'bdTrainingExam'
// }
// ]
};
// add your user config here
const userConfig = {
// myAppName: 'egg',
salt:'bdTrainingExam'
};
return {
...config,
...userConfig,
};
};

1
config/env Normal file
View File

@@ -0,0 +1 @@
prod

21
config/plugin.js Normal file
View File

@@ -0,0 +1,21 @@
/** @type Egg.EggPlugin */
module.exports = {
// had enabled by egg
// static: {
// enable: true,
// }
redis: {
enable: true,
package: 'egg-redis',
},
sequelize: {
enable: true,
package: 'egg-sequelize',
},
validate: {
enable: true,
package: 'egg-validate',
},
};