wangrong
2022-07-08 7e9badac4f3df3650e72bd419f9cdaa485b054d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const WebFramework = require('@midwayjs/web').Framework;
const { SocketFramework, createRedisAdapter} = require('@cool-midway/socket');
const web = new WebFramework().configure({
  port: 8001,
});
 
// // 初始化 socket.io 框架
// const socketFramework = new SocketFramework().configure({
//   port: 3000,
//   // adapter: createRedisAdapter({ host: '192.168.1.2', port: 6379}),
// });
 
const { Bootstrap } = require('@midwayjs/bootstrap');
Bootstrap.load(web).run();
 
const schedule_ = require("./src/schedule/taskSchedule.js");
schedule_.job_();