Module: @aofl/server-environment

Exports getServerEnvironment and environmentTypeEnumerate
Version:
  • 3.0.0
Since:
  • 3.0.0
Author:
Source:

Members


<static, constant> environmentTypeEnumerate :String

Server Environment types Enumerate
Type:
  • String
Properties:
Name Type Default Description
DEV String development development
STAGE String stage stage
PROD String production production
Source:

Methods


<static> getServerEnvironment(devRegex, stageRegex)

Takes a devRegex and a stageRegex and tests them against hostname. Returns 'production' if the regexes do not capture any results from hostname
Parameters:
Name Type Description
devRegex RegExp
stageRegex RegExp
Source:
Returns:
Type
Number