代理服务器上的Browsersync LiveReload

时间:2015-06-09 20:09:10

标签: proxy browser-sync

我是浏览器同步的新手,我似乎无法弄清楚如何在代理服务器上进行实时重新加载。在我当前的设置中,我无法访问本地计算机上的文件,因此我必须使用代理。我目前有一个配置文件,这是当前的设置。

module.exports = {
"ui": {
    "port": 3001,
    "weinre": {
        "port": 8080
    }
},
"files": ['Styles/bootstrap-custom-addons.css', '/Styles/*.css'],
"watchOptions": {},
"server": false,
"proxy": {
    target: "http://example.com",
    files: ['Styles/bootstrap-custom-addons.css', '/Styles/*.css'],
},
"port": 3000,
"middleware": false,
"ghostMode": {
    "clicks": true,
    "scroll": true,
    "forms": {
        "submit": true,
        "inputs": true,
        "toggles": true
    }
},
"logLevel": "info",
"logPrefix": "BS",
"logConnections": false,
"logFileChanges": true,
"logSnippet": true,
"rewriteRules": false,
"open": "local",
"browser": "default",
"xip": false,
"hostnameSuffix": false,
"reloadOnRestart": true,
"notify": true,
"scrollProportionally": true,
"scrollThrottle": 0,
"reloadDelay": 0,
"reloadDebounce": 0,
"plugins": [],
"injectChanges": true,
"startPath": null,
"minify": true,
"host": null,
"codeSync": true,
"timestamps": true,
"clientEvents": [
    "scroll",
    "input:text",
    "input:toggles",
    "form:submit",
    "form:reset",
    "click"
],
"socket": {
    "path": "/browser-sync/socket.io",
    "clientPath": "/browser-sync",
    "namespace": "/browser-sync",
    "clients": {
        "heartbeatTimeout": 5000
    }
},
"tagNames": {
    "less": "link",
    "scss": "link",
    "css": "link",
    "jpg": "img",
    "jpeg": "img",
    "png": "img",
    "svg": "img",
    "gif": "img",
    "js": "script"
}

};

页面滚动和点击浏览器的工作,但是当我更新服务器上的文件时,它不会自动重新加载页面,我是不是正确设置了配置文件?运行浏览器同步start --config bs-config.js和运行brower-sync start --proxy“http://www.example.com”之间的区别是什么?

0 个答案:

没有答案