server

To work out which environment the site is on (dev/staging/live)

Source:
Since:
  • 0.0.51

Methods

(inner) extractDevUrlPrefix() → {string}

Source:

Get the prefix of the url identifying the development/staging server.

Returns:

eg: d51alfie.comcar.co.uk --> d51alfie, d5117.comcar.co.uk --> d5117, comcar.co.uk --> [empty string]

Type
string

(inner) isDev() → {boolean}

Source:

Returns true if the code is being executed on a local development server; false otherwise

Returns:
Type
boolean

(inner) isLive() → {boolean}

Source:

Returns true if the code is being executed on a live server; false if it's on a local dev or staging server

Returns:
Type
boolean

(inner) isStaging() → {boolean}

Source:

Returns true if the code is being executed on a staging server; false otherwise

Returns:
Type
boolean