zx 1 year ago
parent
commit
881b6ac267
1 changed files with 10 additions and 10 deletions
  1. 10 10
      fhKeeper/formulahousekeeper/timesheet-workshop/config/index.js

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet-workshop/config/index.js

@@ -4,17 +4,17 @@ var path = require('path')
 //var ip = '47.101.180.183'
 //var ip = '47.101.180.183'
 // var ip = '47.100.37.243'
 // var ip = '47.100.37.243'
 // var ip = '192.168.10.2'
 // var ip = '192.168.10.2'
-var ip = '192.168.2.12' 
+// var ip = '192.168.2.12' 
 
 
-// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-// for (var i in ifaces) {
-//     for (var j in ifaces[i]) {
-//         var val = ifaces[i][j]
-//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-//             ip = val.address
-//         }
-//     }
-// }
+var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+for (var i in ifaces) {
+    for (var j in ifaces[i]) {
+        var val = ifaces[i][j]
+        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+            ip = val.address
+        }
+    }
+}
 // 1196735749
 // 1196735749
 module.exports = {
 module.exports = {
   build: {
   build: {