From 1cd04ff38f91a20758323611eeec83005c6df04c Mon Sep 17 00:00:00 2001 From: Gnanakeethan Balasubramaniam Date: Wed, 13 Sep 2023 16:18:20 +0530 Subject: [PATCH] Update docs Signed-off-by: Gnanakeethan Balasubramaniam --- docs/implementations/watt-time.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/implementations/watt-time.md b/docs/implementations/watt-time.md index 4d96f4132..9ca0fbd53 100644 --- a/docs/implementations/watt-time.md +++ b/docs/implementations/watt-time.md @@ -30,18 +30,13 @@ Limitations: ```typescript -// inline configuration -const model = await new WattTimeGridEmissions().configure('watt-time', { - username: 'test1', - password: 'test2', -}); -// environment configuration +// environment variable configuration // export WATT_TIME_USERNAME=test1 // export WATT_TIME_PASSWORD=test2 -// prefix the environment variables with "ENV" to load them inside the model. +// use environment variables to configure the model const env_model = await new WattTimeGridEmissions().configure('watt-time', { - username: 'ENV_WATT_TIME_USERNAME', - password: 'ENV_WATT_TIME_PASSWORD', + username: process.env.WATT_TIME_USERNAME, + password: process.env.WATT_TIME_PASSWORD, }); ```