Skip to content

Commit

Permalink
Merge pull request #29 from LeaYeh/patch-auto_detect
Browse files Browse the repository at this point in the history
[patch] auto detect hostname for remote preview
  • Loading branch information
suan committed May 20, 2016
2 parents 1511b85 + b31c336 commit 441d67c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</style>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:8090/');
var socket = io.connect('http://'+ window.location.host +'/');
socket.on('connect', function () {
socket.on('newContent', function(newHTML) {
document.querySelector(".markdown-body").innerHTML = newHTML;
Expand Down

0 comments on commit 441d67c

Please sign in to comment.