2015-09-16 50 views
0

我想在與本地主機不同的IP地址服務我的網站。我正在嘗試在我的主機文件中將該IP地址設置爲我需要測試的網址。這可能與瀏覽器同步?如果不是,有沒有其他的選擇?瀏覽器同步在IP地址服務

回答

0

這與瀏覽同步沒有直接關係。

在您的主機文件中設置IP,然後在您的瀏覽器同步配置中進行代理。

var bs  = require("browser-sync").create(); 
var client = require("./"); 

client["plugin:name"] = "client:script"; 

bs.use(client); 

bs.init({ 
    //server: { 
    // baseDir: ["test/fixtures"] 
    //}, 
    //proxy: 'http://localhost:8080', 
    proxy: 'http://mylocal.com:8080', 
    open: false, 
    minify: false, 
    snippetOptions: { 
     rule: { 
      //match: /SHNAE/, 
      match: /<\/head>/i, 
      fn: function (snippet) { 
       return snippet + "\n</head>"; 
      } 
     } 
    }, 
    clientEvents: [ 
     "scroll", 
     "input:text", 
     "input:toggles", 
     "input:keydown", 
     "input:keypress", 
     "form:submit", 
     "form:reset", 
     "click", 
     "contenteditable:input", 
     "mouseup", 
     "mousedown", 
     "select:change" 
    ], 
    ghostMode: { 
     clicks: true, 
     scroll: true, 
     forms: { 
      submit: true, 
      inputs: true, 
      toggles: true, 
      keypress: true, 
      keydown: true, 
      contenteditable: true, 
      change: true 
     }, 
     mouseup: true, 
     mousedown: true 
    }, 
    capture:true 
});