Commit 6e32c64e authored by Leo Iannacone's avatar Leo Iannacone

made hostname configurable

parent f85f1bd0
...@@ -16,5 +16,7 @@ config.web.description = "This is a web interface for debomatic" ...@@ -16,5 +16,7 @@ config.web.description = "This is a web interface for debomatic"
config.web.footer = "Fork me on github.com" config.web.footer = "Fork me on github.com"
config.web.autoscroll = true config.web.autoscroll = true
config.web.paths = config.routes config.web.paths = config.routes
config.web.host = config.host
config.web.port = ((config.port == 80) ? null : config.port)
module.exports = config module.exports = config
var socket = io.connect('//localhost:3000');
// update distributions // update distributions
socket.on('distributions', function(distributions) { socket.on('distributions', function(distributions) {
$('#distributions ul').html(''); $('#distributions ul').html('');
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<script> <script>
var AUTOSCROLL = <%= autoscroll %> var AUTOSCROLL = <%= autoscroll %>
var DISTRIBUTION_PAGE = '<%= paths.distribution %>' var DISTRIBUTION_PAGE = '<%= paths.distribution %>'
var HOSTNAME = '<%= host %><% if (port) { %>:<%= port%><% } %>'
var socket = io.connect('//' + HOSTNAME);
</script> </script>
<script src='/javascripts/utils.js'></script> <script src='/javascripts/utils.js'></script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment