code: function ip() {
      let network = os.networkInterfaces(),
          keys = Object.keys(network),
          ips = [];
  
      for (let key of keys) {
          network[key].forEach(ip => {
              ip.family === 'IPv4' && !ip.internal && ips.push(ip.address);
          });
      }
  
      return ips.length ? ips[0] : '127.0.0.1';
  }
docs: /*
  ***************************************
  定义获取【ip】方法
  ***************************************