-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running dashboard on another server? #35
Comments
You should be able to just use apache or nginx with the public/ directory as its root. Just be sure to change index.html to make all references to localhost:8000 point to where you're running the node app. |
And actually, now that I think about it, websockets works cross-domain but I'm not sure that all transports provided by socket.io do. One thing that helps is to open up firebug or the webkit inspector and see if there are any errors listed. If not, check out hummingbirdSocket.socket to see what transport socket.io is trying to use. |
Thanks. I'll definitely look a bit closer next time I fire up a new service. I don't recall seeing any inspector errors, but I also didn't have a lot of time to debug what was going on. |
There's a couple of really obvious changes, the one I always forget to make it line 64 of websocket.js, change to In your Index.html: Remember to add relevant ports if you use them. You may need to set your config.js to support this as well, including disabling the local dashboard if you want your tracking pixel on port 80. |
Perhaps in a future version, the JS and CSS paths can be changed to relative paths ("js/helpers.js" instead of "/js/helpers.js") to ensure compatibility with dashboards in subdirectories/aliases of other webserver's virtual hosts. Also HTTPS compatibility for the map would be appreciated, but first Cloudmade should fix their SSL certificates. Edit: I had to copy the socket.io JS and SWF files from somewhere else on my system to the public directory. Maybe these files could be included in the public directory by default, or some documentation could be added about these files. |
Hopefully a0891ca should help some with running the dashboard in a subdirectory of another webserver. I've replaced the Cloudmade maps with some custom maps I've made in Tilemill. The tile URLs are protocol-less and should work on https. If you want to customize the maps, it's pretty easy to generate your own Tilemill maps, extract with mbtile, and upload them to S3. I'm a bit undecided on including the socket.io js in public/. It would make things more convenient long-term, but if the client/server socket.io versions don't stay in sync it can lead to some weird bugs. I'll add some documentation for running the dashboard on another server. |
Hi, I came across the post and wonder if there is already documentation on running hummingbird in another server? I am trying to run hummingbird in Apache2 but I am still unable to get things running correctly. Firstly, I do not see var wsServer = "your.hostname.com"; in websocket.js as mentioned. And also, the console keeps showing dashbord is listening even when I disable it in the config.js. And finally, the reference to <script src="http://your.hostname.com/socket.io/socket.io.js"></script> <script>WEB_SOCKET_SWF_LOCATION = 'http://your.hostname.com/socket.io/WebSocketMain.swf';</script>in index.html seem to not find the resource when I point it to the server name and port that node server.js is running at. I appreciate any help. Thank you. |
I'm really sorry, unfortunately Hummingbird dashboard can't run behind Apache because Apache doesn't support websockets. It can run behind nginx, but only one of the very latest releases. Another option would be putting it behind something like Doorman: https://github.com/movableink/doorman I know this is a pain point for a lot of people so in the next version I plan on adding authentication into Hummingbird itself so that it doesn't have to run behind another webserver. |
Thank you. That would be great. Also, would there be any documentation in how to use Hummingbird? I followed what is on github but I still could not see anything being tracked. I know I must be doing something not right but I just have no clue what would be. Again thank you for you help. On Mar 26, 2013, at 12:12 AM, Michael Nutt [email protected] wrote:
|
Check out this screencast for a demo on setting up hummingbird to work with a wordpress blog: https://vimeo.com/56302832 |
Thank you Michael. I have followed the step until the send test traffic, which does not show the signal like in the screencast. And here is the print out on the console. ➜ hummingbird git:(master) ✗ node server.js
Would there be anything else that was changed and needed extra steps to be taken? Or is there any way to debug what is not working right in my environment? Thanks again for your help. On Mar 26, 2013, at 11:26 PM, Michael Nutt [email protected] wrote:
|
Sorry - brand new to node, so please bare with me. I'm a bit confused by the instruction on getting the dashboard to run on a different server. Should the remote location also be running
node server.js
, or can we just stick it on an Apache/other server? Running it locally (IE localhost:80) loads, however the socket doesn't seem to start (the every-two second tracking lines don't even animate).Any clarification would be much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: