From 59e978f8cda90cecc4aed7b6bdd37846955fcdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=BE=D0=B2=20=D0=90=D1=80=D1=82?= =?UTF-8?q?=D0=B5=D0=BC?= Date: Sun, 21 Jun 2026 02:51:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=20package.json=20?= =?UTF-8?q?=D0=B2=20=D1=87=D0=B0=D1=81=D1=82=D0=B8=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B4=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0?= =?UTF-8?q?.=20=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=B5=D1=89=D0=B5=20?= =?UTF-8?q?=D0=BE=D0=B4=D0=BD=D1=83=20=D0=BB=D0=B8=D1=88=D0=BD=D1=8E=D1=8E?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=83=D1=8E?= =?UTF-8?q?=20=D1=81=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=BE=D0=BC=20pg=20=D1=81=D0=BE=D0=B5=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9.=20Default=20value=20=D1=83=20pg=20poo?= =?UTF-8?q?l=20=3D=2010,=20=D1=87=D0=B5=D0=B3=D0=BE=20=D0=B4=D0=BE=D0=BB?= =?UTF-8?q?=D0=B6=D0=BD=D0=BE=20=D1=85=D0=B2=D0=B0=D1=82=D0=B0=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 3 --- .env.local.example | 1 - docker-compose.yml | 1 - package.json | 4 ++-- src/db/db.service.ts | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index ec18ece..9200741 100644 --- a/.env.example +++ b/.env.example @@ -5,8 +5,5 @@ CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173 # Optional. When set, POST /ingest requires x-api-key: . INGEST_API_KEY= -# Pool sizing for node-postgres. -PG_POOL_MAX=20 - # Poll interval for GET /current/events SSE snapshots. CURRENT_EVENTS_POLL_MS=1000 diff --git a/.env.local.example b/.env.local.example index 05a909f..d52377c 100644 --- a/.env.local.example +++ b/.env.local.example @@ -2,5 +2,4 @@ PORT=3101 DATABASE_URL=postgres://greact:pG3526l4@194.36.208.86:5433/cloud CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173 INGEST_API_KEY= -PG_POOL_MAX=20 CURRENT_EVENTS_POLL_MS=1000 diff --git a/docker-compose.yml b/docker-compose.yml index d9b4c61..7f1b8ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,6 @@ services: DATABASE_URL: ${DATABASE_URL} CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS} INGEST_API_KEY: ${INGEST_API_KEY} - PG_POOL_MAX: ${PG_POOL_MAX} CURRENT_EVENTS_POLL_MS: ${CURRENT_EVENTS_POLL_MS} ports: - "${PORT}:${PORT}" diff --git a/package.json b/package.json index 5da45f8..f594f43 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "license": "PERSONAL", "scripts": { "build": "nest build", - "start": "node --env-file=.env ./node_modules/@nestjs/cli/bin/nest.js start", - "start:dev": "node --env-file=.env ./node_modules/@nestjs/cli/bin/nest.js start --watch", + "start": "nest start --exec \"node --env-file=.env\"", + "start:dev": "nest start --watch --exec \"node --env-file=.env\"", "start:prod": "node dist/main.js", "lint": "eslint \"src/**/*.ts\"", "test": "jest --runInBand" diff --git a/src/db/db.service.ts b/src/db/db.service.ts index 6e2a59d..32c1a09 100644 --- a/src/db/db.service.ts +++ b/src/db/db.service.ts @@ -15,7 +15,6 @@ export class DbService implements OnModuleInit, OnModuleDestroy { async onModuleInit(): Promise { this.pool = new Pool({ connectionString: process.env.DATABASE_URL, - max: Number(process.env.PG_POOL_MAX), idleTimeoutMillis: 30_000, connectionTimeoutMillis: 5_000, statement_timeout: 60_000,