javascript - How do I redirect to different port on same host in Meteor? -


I run in my meteor application on port 2368 which runs on port 3000. Ghost is a different example.

In the template file below, a hyperlink in the meteor app is pointing to a different example Ghost blog.

  & lt; Template Name = "Header" & gt; & Lt; Header class = "navbar" & gt; & Lt; Div class = "navbar-inner" & gt; & Lt; Div class = "top-nav" & gt; & Lt; Div & gt; & Lt; A href = "{{pathFor 'home'}}" & gt; Home & lt; / A & gt; - & lt; A href = "http: // localhost: 2368" & gt; Blogs & lt; / A & gt; - & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Header & gt; & Lt; / Template & gt;   

This works on my local machine, which means that it redirects the blogging system properly. However, even when I posted in the production, this does not work, as it still points to the local host.

What is the best way to find the host name, whether it is on local or production? Is there any way to work through this iron-router?

You can use meteors

For example, HTML :

  & lt; A href = "{{rooturl}}}: 2368" & gt; Blogs & lt; / A & gt;   

and JS:

  Template.header.rooturl = Meteor.absoluteUrl ("");    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -