SdkNodeEnvironment api
Load
Load and inject environment's secrets as environment variables
This is the easiest way to load an environment in a Node.js application. When using this method, the SDK client will get the secrets from the environment and inject them as environment variables in the application process.
Parameters
This method takes optional object parameter with the following optional properties:
Prop
Type
Example
const stashbase = createEnvClient(process.env.SB_ENVIRONMENT_API_KEY)
const { error } = await stashbase.environment.load()
// check for errors
if (error) {
// handle error
}