Skip to content

Commit 87cda90

Browse files
committed
fixed getNet
1 parent ce77c0c commit 87cda90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.vscode/getNet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const { networkInterfaces } = require('os');
22

33
module.exports = async (mode = 'dev') => {
4-
const { WiFi } = getIp();
5-
const ip = WiFi ? WiFi[0] : undefined;
4+
const { WiFi, Ethernet } = getIp();
5+
const [ip] = WiFi || Ethernet;
66
const port = '5500';
77
const src = `https://${ip || '10.0.0'}:${port}`;
88
console.log('Server starting at: ', src);

0 commit comments

Comments
 (0)