短报文教学
This commit is contained in:
171
config/config.default.js
Normal file
171
config/config.default.js
Normal file
@@ -0,0 +1,171 @@
|
||||
/* 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 + '_1715070383253_5684';
|
||||
|
||||
// add your middleware config here
|
||||
// config.middleware = [];
|
||||
|
||||
config.security = {
|
||||
csrf:{
|
||||
enable:false
|
||||
},
|
||||
};
|
||||
|
||||
config.redis = {
|
||||
// 开发/测试环境
|
||||
clients: {
|
||||
db0: {
|
||||
port: 6379,
|
||||
host: '127.0.0.1',
|
||||
password: '74191221',
|
||||
db: 0,
|
||||
},
|
||||
db1: {
|
||||
port: 6379,
|
||||
host: '127.0.0.1',
|
||||
password: '74191221',
|
||||
db: 1,
|
||||
},
|
||||
db2: {
|
||||
port: 6379,
|
||||
host: '127.0.0.1',
|
||||
password: '74191221',
|
||||
db: 2,
|
||||
},
|
||||
db3: {
|
||||
port: 6379,
|
||||
host: '127.0.0.1',
|
||||
password: '74191221',
|
||||
db: 3,
|
||||
},
|
||||
db4: {
|
||||
port: 6379,
|
||||
host: '127.0.0.1',
|
||||
password: '74191221',
|
||||
db: 4
|
||||
}
|
||||
}
|
||||
|
||||
// 生产环境
|
||||
// clients: {
|
||||
// db0: {
|
||||
// port: 6379,
|
||||
// host: '127.0.0.1',
|
||||
// password: 'bd3@htcc2023',
|
||||
// db: 2,
|
||||
// },
|
||||
// db1: {
|
||||
// port: 6379,
|
||||
// host: '127.0.0.1',
|
||||
// password: 'bd3@htcc2023',
|
||||
// db: 3,
|
||||
// },
|
||||
// db2: {
|
||||
// port: 6379,
|
||||
// host: '127.0.0.1',
|
||||
// password: 'bd3@htcc2023',
|
||||
// db: 4,
|
||||
// },
|
||||
// db3: {
|
||||
// port: 6379,
|
||||
// host: '127.0.0.1',
|
||||
// password: 'bd3@htcc2023',
|
||||
// db: 5,
|
||||
// },
|
||||
// db4: {
|
||||
// port: 6379,
|
||||
// host: '127.0.0.1',
|
||||
// password: 'bd3@htcc2023',
|
||||
// db: 6
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
config.sequelize = {
|
||||
// 开发/测试环境
|
||||
datasources: [
|
||||
{
|
||||
dialect: 'mariadb',
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
username: 'root',
|
||||
password: '74191221',
|
||||
database: 'bside',
|
||||
},
|
||||
{
|
||||
dialect: 'mariadb',
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
username: 'root',
|
||||
password: '74191221',
|
||||
database: 'cside',
|
||||
delegate: 'model2',
|
||||
baseDir: 'model2',
|
||||
},
|
||||
{
|
||||
dialect: 'mariadb',
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
username: 'root',
|
||||
password: '74191221',
|
||||
database: 'insiders',
|
||||
delegate: 'model3',
|
||||
baseDir: 'model3',
|
||||
}
|
||||
]
|
||||
|
||||
// 生产环境
|
||||
// datasources: [
|
||||
// {
|
||||
// dialect: 'mariadb',
|
||||
// host: 'localhost',
|
||||
// port: 3306,
|
||||
// username: 'bdqh_platform',
|
||||
// password: '124689@XXxx',
|
||||
// database: 'bside',
|
||||
// },
|
||||
// {
|
||||
// dialect: 'mariadb',
|
||||
// host: 'localhost',
|
||||
// port: 3306,
|
||||
// username: 'bdqh_platform',
|
||||
// password: '124689@XXxx',
|
||||
// database: 'cside',
|
||||
// delegate: 'model2',
|
||||
// baseDir: 'model2',
|
||||
// },
|
||||
// {
|
||||
// dialect: 'mariadb',
|
||||
// host: 'localhost',
|
||||
// port: 3306,
|
||||
// username: 'bdqh_platform',
|
||||
// password: '124689@XXxx',
|
||||
// database: 'insiders',
|
||||
// delegate: 'model3',
|
||||
// baseDir: 'model3',
|
||||
// }
|
||||
// ]
|
||||
};
|
||||
|
||||
// add your user config here
|
||||
const userConfig = {
|
||||
// myAppName: 'egg',
|
||||
salt:'teachingApi'
|
||||
};
|
||||
|
||||
return {
|
||||
...config,
|
||||
...userConfig,
|
||||
};
|
||||
};
|
||||
22
config/plugin.js
Normal file
22
config/plugin.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/** @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',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user