Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 00c4f07

Browse files
committed
Merge pull request #212 from lirantal/bugfix-211-use-request-object-for-urls
localhost hard coded URL for livereload.js bugfix
2 parents a724376 + acc091f commit 00c4f07

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/controllers/core.server.controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
exports.index = function(req, res) {
77
res.render('index', {
8-
user: req.user || null
8+
user: req.user || null,
9+
request: req
910
});
1011
};

app/views/layout.server.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
{% if process.env.NODE_ENV === 'development' %}
6565
<!--Livereload script rendered -->
66-
<script type="text/javascript" src="http://localhost:35729/livereload.js"></script>
66+
<script type="text/javascript" src="http://{{request.hostname}}:35729/livereload.js"></script>
6767

6868
{% endif %}
6969
</body>

0 commit comments

Comments
 (0)