fix(readme): Correct DATABASE_CONFIG example formatting in README and add local settings configuration file
This commit is contained in:
17
readme.md
17
readme.md
@@ -102,17 +102,14 @@ Qenv loads variables in this order (first found wins):
|
||||
Store and retrieve complex configuration objects:
|
||||
|
||||
```typescript
|
||||
// In env.yml
|
||||
const config = {
|
||||
database: {
|
||||
host: 'localhost',
|
||||
port: 5432,
|
||||
options: {
|
||||
ssl: true,
|
||||
# In env.yml
|
||||
DATABASE_CONFIG:
|
||||
database:
|
||||
host: localhost
|
||||
port: 5432
|
||||
options:
|
||||
ssl: true
|
||||
poolSize: 10
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Qenv automatically handles base64 encoding
|
||||
const dbConfig = await qenv.getEnvVarOnDemandAsObject('DATABASE_CONFIG');
|
||||
|
Reference in New Issue
Block a user