From d3918ad9dafc8a8917d9f8d01aaeb10058bd73cf Mon Sep 17 00:00:00 2001 From: JannikStreek Date: Wed, 6 Mar 2024 11:15:09 +0100 Subject: [PATCH] add readme section for Postgres pool variables (#15) --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f0b6afb..6b18477 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,17 @@ It use Keyv as a simple K/V store so you can use the database of your choice. | `STORAGE_TTL` | Time to live for data | null | | `LOG_LEVEL` | Log level (`debug`, `verbose`, `log`, `warn`, `error`) | `warn` | | `BODY_LIMIT` | Payload size limit for scenes or images | `50mb` | + +### Env Variables for Postgres +For setting postgres pool variables, a few code adjustment have to be made in the `storage.service.ts`: +```typescript +const store = new (require('@keyv/postgres'))({ + uri, + max: 1 +}) + +const keyv = new Keyv({ + store, + ttl, +}); +```