Permalink
Browse files

make juggernaut host & port configurable

  • Loading branch information...
1 parent b9fdc7e commit 25535a6b2ca25dbb2ae83199be6e01aeb2a58982 @comboy comboy committed Apr 12, 2012
@@ -1,6 +1,6 @@
$(document).ready ->
- jug = new Juggernaut
+ jug = new Juggernaut(host: '<%= Moci.config[:juggernaut_host] || 'localhost' %>', port: <%= Moci.config[:juggernaut_port] || 8080 %>)
jug.subscribe "moci", (data) ->
console.log("Got data: " + JSON.stringify(data))
@@ -2,7 +2,7 @@
%head
= stylesheet_link_tag 'mystyle'
= javascript_include_tag 'application.js'
- = javascript_include_tag 'http://localhost:8080/application.js'
+ = javascript_include_tag "http://#{Moci.config[:juggernaut_host] || request.host}:#{Moci.config[:juggernaut_port] || 8080}/application.js"
= yield :head
%body
@@ -1,2 +1,4 @@
# Public URL under which moci rails app is available
application_url: http://moci.example.com:3000/
+jugernaut_host: moci.example.com
+jugernaut_port: 8080

0 comments on commit 25535a6

Please sign in to comment.