{
"PROXY_TO": {
"description": "ArcGIS REST endpoint to pass converted requests to",
"required": true
},
"DEFAULT_PARAMS": {
"description": "Querystring parameters to pass along by default",
"required": false
},
"DEBUG": {
"description": "Enable debug mode to log activity to console",
"required": false
}
}
Then if I run via:
$ node test-case.js
I get the expected errors:
The following 1 environmental variable is required:
PROXY_TO ArcGIS REST endpoint to pass converted requests to
The following 2 environmental variables are missing (but optional):
DEFAULT_PARAMS Querystring parameters to pass along by default
DEBUG Enable debug mode to log activity to console
However, when I run it with one of the environment variables:
$ DEFAULT_PARAMS=x node test-case.js
I get no errors; it just gives me the Arrived console log.
This behavior occurs when I use dotenv with a .env file as well. Am I doing something wrong?
Here's my test case:
Then if I run via:
I get the expected errors:
However, when I run it with one of the environment variables:
I get no errors; it just gives me the
Arrived
console log.This behavior occurs when I use dotenv with a
.env
file as well. Am I doing something wrong?