Skip to content

Commit 441d67c

Browse files
committed
Merge pull request #29 from LeaYeh/patch-auto_detect
[patch] auto detect hostname for remote preview
2 parents 1511b85 + b31c336 commit 441d67c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</style>
1717
<script src="/socket.io/socket.io.js"></script>
1818
<script>
19-
var socket = io.connect('http://localhost:8090/');
19+
var socket = io.connect('http://'+ window.location.host +'/');
2020
socket.on('connect', function () {
2121
socket.on('newContent', function(newHTML) {
2222
document.querySelector(".markdown-body").innerHTML = newHTML;

0 commit comments

Comments
 (0)