Meteor js change hostname

I want to run meteor js server on a different hostname. as virtual hosts in xampp ..

by default it runs at http: // localhost: 3000 /

I want it to work at http://meteor.trivia.com:3000

both are local domains

I tried to set ROOT_URL like this: set ROOT_URL = http://meteor.trivia.com:3000 meteor

and then fire a meteorite, but it works ...

I tried to set the hosts file and create a virtual host with a proxy like this:

<VirtualHost meteor.trivia.com:3000>
    ServerName meteor.trivia.com

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    <Location />
        ProxyPass http://localhost:3000/
        ProxyPassReverse http://localhost:3000/
    </Location>


</VirtualHost>

      

it worked, but the application still thinks it is on localhost.

Meteor.absoluteUrl (); "localhost"

I am using windows

+3


source to share


2 answers


for unix, it's just:

ROOT_URL=http://meteor.trivia.com:3000 meteor

(at the beginning "no")


when using windows:



set ROOT_URL=http://meteor.trivia.com:3000

(no "meteor" at the end)

and then in a separate command:

meteor

+2


source


open with nodepad: c: \ Windows \ System32 \ drivers \ etc \ hosts

add host host

127.0.0.1 your.hostname.com



in cmd:

set ROOT_URL = http://meteor.trivia.com:3000

then run meteor

0


source







All Articles