I’m using Node.js with Express, Connect, and Jade. I want to provide an absolute link to a route in my application, but I can’t find how to do this. I must be missing something, because this seems like a simple task.
I can do this: /myroute
But what I want is this: http://localhost:3000/myroute
There must be a helper somewhere that does this, right?
I created my own helper for this, which doesn’t feel like the greatest solution.
I add the helpers in my app.coffee file:
In my [jade] view, this is what I do to get an absolute URL from a relative URL: