Members
(inner, constant) ENVIRONMENT_URLS :string
Enum for RewardOps environment URLs.
Type:
- string
Properties:
| Name | Type | Description |
|---|---|---|
DEVELOPMENT |
string | Development |
QA |
string | Quality assurance |
INTEGRATION |
string | Integration |
UAT |
string | User acceptance testing |
PRODUCTION |
string | Production |
Methods
(inner) getApiBaseUrl(options) → {string}
Get the current RewardOps API base URL, based on the API server URL and the currently
configured apiVersion in module:config.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Base URL objects Properties
|
- Source:
- See:
Returns:
Returns RewardOps API base URL
- Type
- string
(inner) getApiServerUrl() → {string}
Get the current hostname URL for the RewardOps server. Used in
constructing the apiBaseUrl.
Based, in order, on either:
- the
apiServerUrlsetting frommodule:config~DefaultConfig; or, - a
REWARDOPS_ENVNode environment variable (case-insensitive; seemodule:urls~ENVIRONMENT_URLS).
If neither has a known value, the production server URL is returned.
Returns:
Returns RewardOps server hostname URL
- Type
- string
Examples
ro.config.init({ ...restOfConfig, apiServerUrl: 'http://localhost:3000 })
// REWARDOPS_ENV=qa npm start
// REWARDOPS_ENV=development npm start
// REWARDOPS_ENV=DEVELOPMENT npm start