Skip to content

Commit d16bb5b

Browse files
authored
Update dev.js
1 parent 5000192 commit d16bb5b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

nodejs/src/dev.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { createServer } from 'http';
2-
import os from 'os';
3-
import { start } from './index.js';
4-
import * as config from './index.config.js';
2+
import os from 'os'; // 新添加用于支持DS源适配猫影视
3+
import { start } from './index.js'; // 新添加用于支持DS源适配猫影视
4+
import * as config from './index.config.js'; // 新添加用于支持DS源适配猫影视
55

66
globalThis.catServerFactory = (handle) => {
77
let port = 0;
88
const server = createServer((req, res) => {
99
handle(req, res);
1010
});
11-
11+
//下面新添加用于支持DS源适配猫影视
1212
server.on('listening', () => {
1313
port = server.address().port;
1414

15-
// Get local IP addresses
15+
// 获取本地IP地址
1616
const networkInterfaces = os.networkInterfaces();
1717
const addresses = [];
1818
for (const interfaceName in networkInterfaces) {
@@ -30,9 +30,9 @@ globalThis.catServerFactory = (handle) => {
3030
}
3131
console.log(`- Node.js version: ${process.version}`);
3232
});
33-
33+
//上面新添加用于支持DS源适配猫影视
3434
server.on('close', () => {
35-
console.log('Server closed on port ' + port);
35+
console.log('Server closed on port ' + port); //上面新添加用于支持DS源适配猫影视
3636
});
3737

3838
return server;

0 commit comments

Comments
 (0)