Meteor.absoluteUrl

Anywhere

Meteor.absoluteUrl([path], [options])

import { Meteor } from 'meteor/meteor' Source

Generate an absolute URL pointing to the application. The server reads from the ROOT_URL environment variable to determine where it is running. This is taken care of automatically for apps deployed to Galaxy, but must be provided when using meteor build.

Arguments

path String

A path to append to the root URL. Do not include a leading "/".

Options

secure Boolean

Create an HTTPS URL.

replaceLocalhost Boolean

Replace localhost with 127.0.0.1. Useful for services that don't recognize localhost as a domain name.

rootUrl String

Override the default ROOT_URL from the server environment. For example: "http://foo.example.com"

doc_Meteor
2016-05-29 17:20:52
Comments
Leave a Comment

Please login to continue.