|
|
@@ -196,15 +196,17 @@ frappe.socket = { |
|
|
|
}, |
|
|
|
setup_file_watchers: function() { |
|
|
|
var host = window.location.origin; |
|
|
|
if(window.dev_server) { |
|
|
|
var port = '6787'; |
|
|
|
var parts = host.split(":"); |
|
|
|
// remove the port number from string if exists |
|
|
|
if (parts.length > 2) { |
|
|
|
host = host.split(':').slice(0, -1).join(":"); |
|
|
|
} |
|
|
|
host = host + ':' + port; |
|
|
|
if(!window.dev_server) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var port = '6787'; |
|
|
|
var parts = host.split(":"); |
|
|
|
// remove the port number from string if exists |
|
|
|
if (parts.length > 2) { |
|
|
|
host = host.split(':').slice(0, -1).join(":"); |
|
|
|
} |
|
|
|
host = host + ':' + port; |
|
|
|
|
|
|
|
frappe.socket.file_watcher = io.connect(host); |
|
|
|
// css files auto reload |
|
|
|