feat: implement Prisma singleton for memory efficiency and add memory monitoring options

This commit is contained in:
2025-09-23 22:38:06 -05:00
parent a33f033a64
commit 494617c4f6
7 changed files with 124 additions and 21 deletions

View File

@@ -5,7 +5,11 @@
"main": "src/main.ts",
"scripts": {
"start": "npx tsx watch src/main.ts",
"dev": "npx tsx watch src/main.ts"
"dev": "npx tsx watch src/main.ts",
"dev:light": "CACHE_MESSAGES_LIMIT=25 CACHE_MEMBERS_LIMIT=50 SWEEP_MESSAGES_LIFETIME_SECONDS=600 SWEEP_MESSAGES_INTERVAL_SECONDS=240 npx tsx watch --clear-screen=false src/main.ts",
"dev:mem": "MEMORY_LOG_INTERVAL_SECONDS=120 npx tsx watch src/main.ts",
"start:prod": "NODE_ENV=production NODE_OPTIONS=--max-old-space-size=384 npx tsx src/main.ts",
"typecheck": "tsc --noEmit"
},
"keywords": [ ],
"author": "",