Skip to content

Commit

Permalink
SLSCMN-3 config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Nov 23, 2023
1 parent dcd4e80 commit eee0fdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/services/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const myConfigSchema = lambdaConfigSchema.keys({
EXPIRES_IN_DAYS: Joi.number().default(30),
});

// validate and process custom configuration
const config: MyConfig = validateConfig<MyConfig>(myConfigSchema);
export default config;
```
Expand All @@ -73,7 +74,7 @@ console.log(`The table name is ${config.TABLE_NAME}`);

## Performance considerations

The configuration attributes are validatedby Joi. To ensure that performance is not negatively
The configuration attributes are validated by Joi. To ensure that performance is not negatively
impacted, this validation occurs just once, when the configuration module
is first loaded by the module loader. When modules subsequently import the configuration
object, the pre-processed object is loaded without executing the validation process again.

0 comments on commit eee0fdd

Please sign in to comment.