Adobe I/O Env Lib
This is a helper library that is to be used in the Adobe I/O CLI and SDKs to determine the environment to run in, whether prod
, or stage
.
Installing
$ npm install @adobe/aio-lib-env
Usage
Determining the Environment
const {
getCliEnv,
setCliEnv,
SUPPORTED_ENVS,
DEFAULT_ENV,
PROD_ENV,
STAGE_ENV
} = require('@adobe/aio-lib-env')
const env = getCliEnv()
Setting the Environment (.aio)
{
cli: {
env: "prod"
}
}
Setting the Environment (.env)
AIO_CLI_ENV=prod
Setting the Environment (in code)
const { setCliEnv, PROD_ENV, STAGE_ENV } = require('@adobe/aio-lib-env')
setCliEnv(PROD_ENV)
setCliEnv(STAGE_ENV)
setCliEnv('delta-quadrant')
Debug Logs
LOG_LEVEL=debug <your_call_here>
Prepend the LOG_LEVEL
environment variable and debug
value to the call that invokes your function, on the command line. This should output a lot of debug data for your SDK calls.
Contributing
Contributions are welcome! Read the Contributing Guide for more information.
Licensing
This project is licensed under the Apache V2 License. See LICENSE for more information.