vogue icon indicating copy to clipboard operation
vogue copied to clipboard

Using Vogue hosted on another machine causes issues

Open jgeurts opened this issue 13 years ago • 3 comments

Hi,

I'm very new to node.js and vogue. I have an ubuntu box (192.168.1.44) setup with Node and Vogue and I do my primary web development from another machine (a built in web server). When I visit 192.168.1.44:8001, I get the vogue instructions. When I add to my site, vogue does not load properly. I used Fiddler to sniff the network and it looks like Vogue is making requests to http://localhost:8001 instead of http://192.168.1.44:8001.

Digging into the source of Vogue, it looks like my problem stems from the getScriptInfo method. It picks the document.location.host, rather than getting the location of the script. I tried to set the vogue object and that seems to get me a little further:

window.__vogue__ = {
  url: 'http://192.168.1.44:8001/',
  domain: '192.168.1.44',
  port: 8001
};

But now I get messages like "Could not read stats for /home/jim/node/Content/css/Site.min.css" on the server.

Am I doing things wrong or missing a configuration step somewhere? Or is Vogue meant more as a local development tool and not to be shared by many developers?

jgeurts avatar Apr 19 '11 21:04 jgeurts

I only use Vogue locally myself, however it should also work remotely. The vogue global is meant to be used when using Vogue as a bookmarklet, so should be undefined and ignored when referencing the Vogue script directly. Are you able to put a breakpoint (using FireBug, or similar) into getScriptInfo and see the values it is extracting from the script's src URL?

Also, is that css path (/home/jim/node/Content/css/Site.min.css) correct? Or is it in the wrong directory?

andrewdavey avatar Apr 20 '11 07:04 andrewdavey

The css path is correct after the /home/jim/node/ part. I wasn't sure what the parameter passed to vogue was for, so I just started it by typing "vogue" in my Node directory. I will take a look at firebug and see if I can help diagnose things further. Thanks for your help!

jgeurts avatar Apr 20 '11 13:04 jgeurts

Is this the same problem as Issue #17? If so, I've mentioned a patch in there.

americanwookie avatar Jun 10 '11 23:06 americanwookie