添加 eggjs web-server,初步支持多宝短信
This commit is contained in:
27
web-server/config/config.default.ts
Normal file
27
web-server/config/config.default.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
|
||||
|
||||
export default (appInfo: EggAppInfo) => {
|
||||
const config = {} as PowerPartial<EggAppConfig>;
|
||||
|
||||
// override config from framework / plugin
|
||||
// use for cookie sign key, should change to your own and keep security
|
||||
config.keys = appInfo.name + '_1597499383757_3508';
|
||||
config.security = {
|
||||
csrf: {
|
||||
enable: false,
|
||||
},
|
||||
};
|
||||
// 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}`,
|
||||
};
|
||||
|
||||
// the return config will combines to EggAppConfig
|
||||
return {
|
||||
...config,
|
||||
...bizConfig,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user