-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
22 lines (20 loc) · 674 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';
/**
* @description load plugin egg-axios-plus
* @author Taylor
* @github https://github.com/mmdapl
*/
const loader = require('./lib/axios_loader.js');
module.exports = async app => {
// Combined with egg framework last configuration, load egg-axios-plus
const { axiosPlus } = app.config;
const startTime = new Date().getTime();
if (axiosPlus.app) {
await loader(app);
// 计算启动耗时
const intervalTime = new Date().getTime() - startTime;
app.logger.info(
`[egg-axios-plus] : The plugin took a total of ${intervalTime}ms to start in app.js , Thank you for using egg-axios-plus and wish you a happy life`
);
}
};